X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftstlog.c;h=04f978713fcb824dd1f57f9ba4c402a600ce028b;hp=dcb87d3309481cca880e9d6fd9f819f90c441d5f;hb=69c2dee55aa204cab368989b8385eda8b83bf2e2;hpb=56f715bb23c31ea1f8a551e7f1f9b58a10bafbad diff --git a/test/tstlog.c b/test/tstlog.c index dcb87d3..04f9787 100644 --- a/test/tstlog.c +++ b/test/tstlog.c @@ -1,11 +1,9 @@ -/* - * Copyright (C) 1995-2005, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: tstlog.c,v 1.9 2006-03-21 12:32:16 adam Exp $ - * */ #include +#include #include #include #include @@ -26,16 +24,19 @@ int main(int argc, char **argv) int number = 1; unsigned int wait_between_log = 0; - while ((ret = options("f:v:l:m:n:s:w:Hh", argv, argc, &arg)) != -2) + while ((ret = options("f:p:v:l:m:n:r:w:Hh", argv, argc, &arg)) != -2) { switch (ret) { - case 's': + case 'r': yaz_log_init_max_size(atoi(arg)); break; 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; @@ -55,7 +56,7 @@ int main(int argc, char **argv) wait_between_log = atoi(arg); break; case 'H': - log_event_start(hook_func, 0); + yaz_log_set_handler(hook_func, 0); break; case 0: for (i = 0; i