From: Michal Voců Date: Thu, 13 Jan 2005 14:04:05 +0000 (+0000) Subject: * add thread id to debug output X-Git-Tag: gridsite-core_R_1_1_4_GLITE_RC1~2 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=83e3e99cd5786dc44c43f09d44ebf381c599dd69;p=jra1mw.git * add thread id to debug 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);