]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Prefix log messages with PID
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 24 Feb 2010 21:17:53 +0000 (22:17 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 24 Feb 2010 21:17:53 +0000 (22:17 +0100)
util.c

diff --git a/util.c b/util.c
index 637c228e1b5515b7c6d5bd0015758728de5c7005..274a5002e4019dc88cd781a0105d3cffab98d897 100644 (file)
--- 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);