{
char *arg;
int i, ret;
- int level = YLOG_LOG;
+ int message_level = YLOG_LOG;
+ int module_no = 0;
int number = 1;
unsigned int wait_between_log = 0;
- while ((ret = options("f:p:v:l:m:n:r:w:Hh", argv, argc, &arg)) != -2)
+ while ((ret = options("f:p:v:l:m:M:n:r:w:Hh", argv, argc, &arg)) != -2)
{
switch (ret)
{
number = atoi(arg);
break;
case 'm':
- level = yaz_log_module_level(arg);
+ module_no = yaz_log_module_level(arg);
+ break;
+ case 'M':
+ message_level = yaz_log_module_level(arg);
break;
case 'w':
wait_between_log = atoi(arg);
case 0:
for (i = 0; i<number; i++)
{
- yaz_log(level, "%d %s", i, arg);
+ yaz_log(module_no|message_level, "%d %s", i, arg);
#if HAVE_UNISTD_H
if (wait_between_log)
sleep(wait_between_log);
case 'h':
default:
fprintf(stderr, "tstlog [-f logformat] [-v level] [-l file] "
- "[-p prefix] [-m module] [-w sec] [-r max] [-n num] [-H] msg ..\n");
+ "[-p prefix] [-m module] -M [message log level] [-w sec] [-r max] [-n num] [-H] msg ..\n");
exit(1);
}
}