X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftestlib.c;h=84e7b73ce72df147d3b88f96a28d9543ba2cfabe;hb=ecb3935e78cd9bcfdebafdee0834cfb1060d7b5e;hp=fe1ecc111879261dedb98515c13273525d36b128;hpb=74fdf8a15af7bb827a256d9df3ecc34a57d2120f;p=idzebra-moved-to-github.git diff --git a/test/api/testlib.c b/test/api/testlib.c index fe1ecc1..84e7b73 100644 --- a/test/api/testlib.c +++ b/test/api/testlib.c @@ -1,4 +1,4 @@ -/* $Id: testlib.c,v 1.30 2006-03-31 15:58:05 adam Exp $ +/* $Id: testlib.c,v 1.32 2006-05-10 08:13:35 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -51,10 +51,14 @@ void tl_start_log(int argc, char **argv) if (!argv[0]) return; sprintf(logname, "%s.log", argv[0]); +#if HAVE_UNISTD_H + unlink(logname); +#endif yaz_log_init_file(logname); - log_level = yaz_log_mask_str_x(argv[0], 0); if (argc >= 2) - cmd_level |= yaz_log_mask_str_x(argv[1], 0); + log_level = yaz_log_mask_str_x(argv[1], 0); + if (argc >= 3) + yaz_log_time_format(argv[2]); yaz_log_init_level(YLOG_DEFAULT_LEVEL | log_level | cmd_level); yaz_log(log_level, "starting %s", argv[0]); } @@ -455,3 +459,11 @@ void tl_check_filter(ZebraService zs, const char *name) +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +