diff options
| author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-12-23 18:06:33 +0100 | 
|---|---|---|
| committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-12-24 00:54:16 +0100 | 
| commit | cbaa4a95cc6c74c7a2cfe8a5acaf7b4867fc343a (patch) | |
| tree | 83e677ea968ae93e96ee269510ae51d8ab338aa8 /include | |
| parent | b814df8ed2939649284533d61eb26c29ed2ab2c8 (diff) | |
| download | ouroboros-cbaa4a95cc6c74c7a2cfe8a5acaf7b4867fc343a.tar.gz ouroboros-cbaa4a95cc6c74c7a2cfe8a5acaf7b4867fc343a.zip  | |
logs: Print process id's to stdout
Diffstat (limited to 'include')
| -rw-r--r-- | include/ouroboros/logs.h | 7 | 
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)  | 
