]> mj.ucw.cz Git - libucw.git/commitdiff
Logging: Fixed formatting when we have neither log_title nor log_pid.
authorMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:51:38 +0000 (18:51 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:51:38 +0000 (18:51 +0100)
ucw/log.c

index 411a1068fbef1d62605da56a459b5a9b6a8ba506..0810451b0c3ca5d5cb48e818486778b0934492d2 100644 (file)
--- a/ucw/log.c
+++ b/ucw/log.c
@@ -255,7 +255,7 @@ log_pass_msg(int depth, struct log_stream *ls, struct log_msg *m)
     }
   else
     {
-      if (ls->msgfmt & LSFMT_PID)
+      if ((ls->msgfmt & LSFMT_PID) && log_pid)
        p += sprintf(p, "[%d] ", log_pid);
     }