From cbaa4a95cc6c74c7a2cfe8a5acaf7b4867fc343a Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Fri, 23 Dec 2016 18:06:33 +0100 Subject: logs: Print process id's to stdout --- include/ouroboros/logs.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') 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 #include #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) -- cgit v1.2.3