aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-05-03 19:40:00 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-05-06 11:21:43 +0200
commitfc73c073a127c702e2513c2983871a8970879845 (patch)
tree61a6884886e6d19eb79b7c9632360ebc7da62d5d /CommonLibs
parentsmpl_buf: Remove dbg log line with duplicated info (diff)
downloadOsmoTRX-fc73c073a127c702e2513c2983871a8970879845.tar.xz
OsmoTRX-fc73c073a127c702e2513c2983871a8970879845.zip
Introduce LOGCHAN macro to standarize logging channel info
Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936
Diffstat (limited to 'CommonLibs')
-rw-r--r--CommonLibs/Logger.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/CommonLibs/Logger.h b/CommonLibs/Logger.h
index e18ecfb..9c665cd 100644
--- a/CommonLibs/Logger.h
+++ b/CommonLibs/Logger.h
@@ -56,6 +56,9 @@ extern "C" {
#define LOGLV(category, level) \
Log(category, level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
+#define LOGCHAN(chan, category, level) \
+ Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "][chan=" << chan << "] "
+
/**
A C++ stream-based thread-safe logger.
This object is NOT the global logger;