diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-10-03 01:21:47 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-10-03 01:21:47 +0000 |
commit | 1945c96f2b0ad2bf09b1a2e182d2d0d98a30698e (patch) | |
tree | 3447304105cc0c05abcd21d80fda1d1791f5039e /nscd/dbg_log.c | |
parent | 1507c81f2a3a28129806bdeb98287766cf3bffb8 (diff) | |
download | glibc-1945c96f2b0ad2bf09b1a2e182d2d0d98a30698e.tar.gz |
Update,
* nscd/connections.c: Rewrite handling of incoming connections. All
are handled by one thread which then hands of the descriptors for the
real work to the worker threads.
* nscd/Makefile: Link nscd with librt.
* nscd/selinux.c: Pretty printing.
* nscd/dbg_log.c (dbg_log): Don't add unnecessary newline to
output. Let syslog do the formatting if debug_level == 0.
Diffstat (limited to 'nscd/dbg_log.c')
-rw-r--r-- | nscd/dbg_log.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nscd/dbg_log.c b/nscd/dbg_log.c index bcd9426020..afa06dcbe9 100644 --- a/nscd/dbg_log.c +++ b/nscd/dbg_log.c @@ -61,7 +61,8 @@ dbg_log (const char *fmt,...) if (debug_level > 0) { - snprintf (msg, sizeof (msg), "%d: %s\n", getpid (), msg2); + snprintf (msg, sizeof (msg), "%d: %s%s", getpid (), msg2, + msg2[strlen (msg2) - 1] == '\n' ? "" : "\n"); if (dbgout) { fputs (msg, dbgout); @@ -71,9 +72,7 @@ dbg_log (const char *fmt,...) fputs (msg, stderr); } else - { - snprintf (msg, sizeof (msg), "%d: %s", getpid (), msg2); - syslog (LOG_NOTICE, "%s", msg); - } + syslog (LOG_NOTICE, "%d %s", getpid (), msg2); + va_end (ap); } |