From 731d5ea9d8ecf91c3cb480dcd36b7e26272f358e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Voc=C5=AF?= Date: Fri, 14 Jan 2005 14:41:49 +0000 Subject: [PATCH] * print thread id in debugging output --- org.glite.lb.common/src/il_log.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); -- 1.8.2.3