From 090c1e2184093cd247bac146eb26cc23f5375d62 Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Sun, 10 Jul 2016 09:28:34 +0300 Subject: [PATCH] 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 --- debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.44.0