summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-12-23 18:06:33 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-12-24 00:54:16 +0100
commitcbaa4a95cc6c74c7a2cfe8a5acaf7b4867fc343a (patch)
tree83e677ea968ae93e96ee269510ae51d8ab338aa8
parentb814df8ed2939649284533d61eb26c29ed2ab2c8 (diff)
downloadouroboros-cbaa4a95cc6c74c7a2cfe8a5acaf7b4867fc343a.tar.gz
ouroboros-cbaa4a95cc6c74c7a2cfe8a5acaf7b4867fc343a.zip
logs: Print process id's to stdout
-rw-r--r--include/ouroboros/logs.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/ouroboros/logs.h b/include/ouroboros/logs.h
index 56eac068..6a16aca6 100644
--- a/include/ouroboros/logs.h
+++ b/include/ouroboros/logs.h
@@ -24,6 +24,7 @@
#ifndef OUROBOROS_LOGS_H
#define OUROBOROS_LOGS_H
+#include <unistd.h>
#include <stdio.h>
#ifndef OUROBOROS_PREFIX
@@ -55,8 +56,10 @@ extern FILE * logfile;
FMT ANSI_COLOR_RESET "\n", ##ARGS); \
fflush(logfile); \
} else { \
- printf(CLR OUROBOROS_PREFIX "(" LVL "): " \
- FMT ANSI_COLOR_RESET "\n", ##ARGS); \
+ printf(CLR "==%05d== " \
+ OUROBOROS_PREFIX "(" LVL "): " \
+ FMT ANSI_COLOR_RESET "\n", getpid(), \
+ ##ARGS); \
} \
} while (0)