2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: tstlog.c,v 1.8 2005-09-16 21:14:38 adam Exp $
10 #include <yaz/options.h>
16 int main(int argc, char **argv)
22 unsigned int wait_between_log = 0;
24 while ((ret = options("f:v:l:m:n:s:w:", argv, argc, &arg)) != -2)
29 yaz_log_init_max_size(atoi(arg));
32 yaz_log_time_format(arg);
35 yaz_log_init_level(yaz_log_mask_str(arg));
38 yaz_log_init_file(arg);
44 level = yaz_log_module_level(arg);
47 wait_between_log = atoi(arg);
50 for (i = 0; i<number; i++)
52 yaz_log(level, "%d %s", i, arg);
55 sleep(wait_between_log);
60 fprintf(stderr, "tstlog. Bad option\n");
61 fprintf(stderr, "tstlog [-f logformat] [-v level] [-l file] "
62 "[-m module] [-w sec] [-s max] [-n num] msg ..\n");
71 * indent-tabs-mode: nil
73 * vim: shiftwidth=4 tabstop=8 expandtab