X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstlog.c;h=529c346ac32f9034452f6773e9cce6dd77da4927;hp=96cd95b74fa4953ca2deb0444bba869ae6adf0b6;hb=e8fb3033342e237ed26a45aa2147e1aacd96b4dd;hpb=52ef22373a88e2cc18e515610a40b3cb4e0b7549 diff --git a/test/tstlog.c b/test/tstlog.c index 96cd95b..529c346 100644 --- a/test/tstlog.c +++ b/test/tstlog.c @@ -1,9 +1,6 @@ -/* - * Copyright (C) 1995-2005, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2008 Index Data * See the file LICENSE for details. - * - * $Id: tstlog.c,v 1.11 2006-10-04 07:32:36 adam Exp $ - * */ #include #include @@ -27,7 +24,7 @@ int main(int argc, char **argv) int number = 1; unsigned int wait_between_log = 0; - while ((ret = options("f:v:l:m:n:r:w:Hh", argv, argc, &arg)) != -2) + while ((ret = options("f:p:v:l:m:n:r:w:Hh", argv, argc, &arg)) != -2) { switch (ret) { @@ -37,6 +34,9 @@ int main(int argc, char **argv) case 'f': yaz_log_time_format(arg); break; + case 'p': + yaz_log_init_prefix(arg); + break; case 'v': yaz_log_init_level(yaz_log_mask_str(arg)); break; @@ -70,9 +70,8 @@ int main(int argc, char **argv) break; case 'h': default: - fprintf(stderr, "tstlog. Bad option\n"); fprintf(stderr, "tstlog [-f logformat] [-v level] [-l file] " - "[-m module] [-w sec] [-r max] [-n num] [-H] msg ..\n"); + "[-p prefix] [-m module] [-w sec] [-r max] [-n num] [-H] msg ..\n"); exit(1); } }