From: Adam Dickmeiss Date: Tue, 24 May 2005 11:27:48 +0000 (+0000) Subject: Allow loglevel string to be specified for tests as first arg X-Git-Tag: snippet.version.1~21 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=86277fd5ab0909de99a3e81b92d087ae45882a4a;p=idzebra-moved-to-github.git Allow loglevel string to be specified for tests as first arg --- diff --git a/test/api/testlib.c b/test/api/testlib.c index e960d0d..c0a495b 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.20 2005-05-24 11:27:48 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -41,9 +41,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); + log_level = yaz_log_mask_str_x(argv[0], 0); + if (argc >= 2) + log_level |= yaz_log_mask_str_x(argv[1], 0); yaz_log_init_level(YLOG_DEFAULT_LEVEL | log_level); - yaz_log(log_level,"starting %s",argv[0]); + yaz_log(log_level, "starting %s", argv[0]); } /**