From 1e2da1868ab0319b915ab0046f7dd2ee02334ee0 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 24 Feb 2010 22:17:53 +0100 Subject: [PATCH] Prefix log messages with PID --- util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index 637c228e1..274a5002e 100644 --- a/util.c +++ b/util.c @@ -50,6 +50,7 @@ void cc_log(const char *format, ...) if (!logfile) logfile = fopen(cache_logfile, "a"); if (!logfile) return; + fprintf(logfile, "[%-5d] ", getpid()); va_start(ap, format); vfprintf(logfile, format, ap); va_end(ap); @@ -70,7 +71,7 @@ void fatal(const char *format, ...) va_start(ap, format); - fprintf(logfile, "FATAL: "); + fprintf(logfile, "[%-5d] FATAL: ", getpid()); vfprintf(logfile, format, ap); fflush(logfile); -- 2.47.3