From: Michal Voců Date: Fri, 14 Jan 2005 14:41:49 +0000 (+0000) Subject: * print thread id in debugging output X-Git-Tag: glite-lb-common_R_1_1_1~12 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=731d5ea9d8ecf91c3cb480dcd36b7e26272f358e;p=jra1mw.git * print thread id in debugging output --- diff --git a/org.glite.lb.common/src/il_log.c b/org.glite.lb.common/src/il_log.c index 11170c5..e3682a3 100644 --- a/org.glite.lb.common/src/il_log.c +++ b/org.glite.lb.common/src/il_log.c @@ -4,6 +4,7 @@ #include #include #include +#include int log_level; @@ -17,9 +18,11 @@ il_log(int level, char *fmt, ...) vasprintf(&err_text, fmt, fmt_args); va_end(fmt_args); - if(level <= log_level) + if(level <= log_level) { + fprintf(stderr, "[%6d] ", pthread_self()); fprintf(stderr, err_text); - + } + if(level <= LOG_ERR) { openlog("edg-wl-interlogd", LOG_PID | LOG_CONS, LOG_DAEMON); syslog(level, "%s", err_text);