X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Flog.c;h=912287b29e2bb077a33b4cc62ae9ce52d2ec2f47;hp=eccb1ede7037d431cf10d0e2ebaa34290b1c6284;hb=7d640b3f9eeb46ab57958aa21b63f26271162ee7;hpb=ebcb0cd09361a4b814ad8b7e629938c474af0be2 diff --git a/src/log.c b/src/log.c index eccb1ed..912287b 100644 --- a/src/log.c +++ b/src/log.c @@ -332,7 +332,10 @@ static void yaz_log_open_check(struct tm *tm, int force, const char *filemode) #ifdef WIN32 yaz_log_close(); #endif - new_file = fopen(cur_filename, filemode); + if (!strncmp(cur_filename, "fd=", 3)) + new_file = fdopen(atoi(cur_filename + 3), filemode); + else + new_file = fopen(cur_filename, filemode); if (new_file) { yaz_log_close(); @@ -577,11 +580,12 @@ int yaz_log_mask_str(const char *str) return yaz_log_mask_str_x(str, l_level); } +/* this function is called by yaz_log_init_globals & yaz_init_globals + and, thus, may not call any of them indirectly */ int yaz_log_mask_str_x(const char *str, int level) { const char *p; - yaz_init_globals(); while (*str) { int negated = 0;