From: Timo Kokkonen Date: Sun, 10 Jul 2016 06:28:34 +0000 (+0300) Subject: debug: Remove pid number from debug prints X-Git-Url: http://git.itanic.dy.fi/?p=rrdd;a=commitdiff_plain;h=090c1e2184093cd247bac146eb26cc23f5375d62 debug: Remove pid number from debug prints Everything happens now in the same pid name space. Thread numbers change, but thread names are more descriptive than numbers. Remove the pid number and put the thread name inside the bracets. Signed-off-by: Timo Kokkonen --- diff --git a/debug.c b/debug.c index 437ce5e..201f7ef 100644 --- a/debug.c +++ b/debug.c @@ -60,9 +60,8 @@ void print_trace(const char *file, int line, int color, int l, pthread_getname_np(pthread_self(), thread_name, sizeof(thread_name)); ret = snprintf(all_trace, sizeof(all_trace), - "%s%s [%5d] %s %s:%d %s %s", + "%s%s [%s] %s:%d %s %s", color_str, time, - getpid(), thread_name, file, line, normal_color, trace);