X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftestlib.c;h=aee77dc6b9e7c7e7ad6d30187be2adfa22dc8765;hb=5d3d666d4712604159141d991dadd3e6299565bd;hp=e960d0d0d7a2708740e6c1aa99edee25531b4495;hpb=0ad2ccc469f9a06aa330f27f6810140ae33e76ec;p=idzebra-moved-to-github.git diff --git a/test/api/testlib.c b/test/api/testlib.c index e960d0d..aee77dc 100644 --- a/test/api/testlib.c +++ b/test/api/testlib.c @@ -1,4 +1,4 @@ -/* $Id: testlib.c,v 1.19 2005-05-09 12:03:59 adam Exp $ +/* $Id: testlib.c,v 1.21 2005-05-31 07:22:20 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -34,6 +34,7 @@ int log_level=0; /* not static, t*.c may use it */ void start_log(int argc, char **argv) { + int cmd_level = 0; char logname[2048]; if (!argv) return; @@ -41,9 +42,11 @@ void start_log(int argc, char **argv) return; sprintf(logname, "%s.log", argv[0]); yaz_log_init_file(logname); - log_level = yaz_log_mask_str_x(argv[0],0); - yaz_log_init_level(YLOG_DEFAULT_LEVEL | log_level); - yaz_log(log_level,"starting %s",argv[0]); + log_level = yaz_log_mask_str_x(argv[0], 0); + if (argc >= 2) + cmd_level |= yaz_log_mask_str_x(argv[1], 0); + yaz_log_init_level(YLOG_DEFAULT_LEVEL | log_level | cmd_level); + yaz_log(log_level, "starting %s", argv[0]); } /**