X-Git-Url: http://git.tuebingen.mpg.de/dss.git/log?a=blobdiff_plain;f=dss.c;h=c6c48f51889fc1c5c7e7a1e44c550a262886f8a7;hb=04a4e5db8eeb1744d668353366bf5e98491550d5;hp=54d6e42be32a6b381529d0dc2b9224ce2faaf79e;hpb=3f26d08dbcdc2dcafa6f6ca73421516254decd94;p=dss.git diff --git a/dss.c b/dss.c index 54d6e42..c6c48f5 100644 --- a/dss.c +++ b/dss.c @@ -244,16 +244,19 @@ __printf_1_2 void dss_log(const char* fmt,...) if (loglevel < lpr_ll) return; outfd = logfile? logfile : stderr; - time(&t1); - tm = localtime(&t1); - strftime(str, sizeof(str), "%b %d %H:%M:%S", tm); - fprintf(outfd, "%s ", str); - if (lpr_ll <= INFO) - fprintf(outfd, "%i: ", loglevel); + if (subcmd == CMD_PTR(RUN)) { + time(&t1); + tm = localtime(&t1); + strftime(str, sizeof(str), "%b %d %H:%M:%S", tm); + fprintf(outfd, "%s ", str); + if (lpr_ll <= INFO) + fprintf(outfd, "%i: ", loglevel); + } + if (subcmd == CMD_PTR(RUN)) #ifdef DSS_NO_FUNC_NAMES - fprintf(outfd, "%s:%d: ", location_file, location_line); + fprintf(outfd, "%s:%d: ", location_file, location_line); #else - fprintf(outfd, "%s: ", location_func); + fprintf(outfd, "%s: ", location_func); #endif va_start(argp, fmt); vfprintf(outfd, fmt, argp);