From d30fbb22e022f485b06fe69a89d70542e50358aa Mon Sep 17 00:00:00 2001 From: Benoit Dejean Date: Sun, 19 Jul 2015 22:03:39 +0200 Subject: [PATCH] Also display file/line/function in debug messages. --- include/glibtop/error.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/glibtop/error.h b/include/glibtop/error.h index fdce2fd3..d5cc4817 100644 --- a/include/glibtop/error.h +++ b/include/glibtop/error.h @@ -50,7 +50,7 @@ void glibtop_warn_io (const char *format, ...) G_GNUC_PRINTF(1, 2); #define glibtop_debug_r(server, fmt, ...) \ G_STMT_START { \ if (LIBGTOP_ENABLE_DEBUG) \ - glibtop_debug_r_real(server, fmt, ##__VA_ARGS__); \ + glibtop_debug_r_real(server, "%s:%d %s(): " fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__); \ } G_STMT_END #define glibtop_debug(...) glibtop_debug_r(glibtop_global_server, __VA_ARGS__)