mirror of
https://github.com/reactos/ccache.git
synced 2025-01-09 13:00:37 +00:00
Prefix log messages with PID
This commit is contained in:
parent
3eb87a8bbf
commit
1e2da1868a
3
util.c
3
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user