This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/23160 )
Change subject: Drop logging pthread ID
......................................................................
Drop logging pthread ID
new libosmocore osmo-trx already depends on does support printing thread
ID as prefix to all messages (confgiurable through VTY), so there's no
use in printing it in osmo-trx unconditionally.
Moreover, The type used to represent a thread ID is implementation
specific, and may be an opaqe structure, making it unsuitable to be
printed by standard means, so in any case we should be better printing
system's TID instead.
Related: OS#5032
Change-Id: Ie98a21246230c946afc47f4f5b9c6618eefde494
---
M CommonLibs/Logger.h
M CommonLibs/debug.h
2 files changed, 6 insertions(+), 11 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/CommonLibs/Logger.h b/CommonLibs/Logger.h
index b752e51..6452e25 100644
--- a/CommonLibs/Logger.h
+++ b/CommonLibs/Logger.h
@@ -50,19 +50,19 @@
#endif
#define LOG(level) \
- Log(DMAIN, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
+ Log(DMAIN, LOGL_##level, __BASE_FILE__, __LINE__).get()
#define LOGC(category, level) \
- Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
+ Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get()
#define LOGLV(category, level) \
- Log(category, level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "] "
+ Log(category, level, __BASE_FILE__, __LINE__).get()
#define LOGSRC(category, level, file, line) \
- Log(category, level, file, line).get() << "[tid=" << pthread_self() << "] "
+ Log(category, level, file, line).get()
#define LOGCHAN(chan, category, level) \
- Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[tid=" << pthread_self() << "][chan=" << chan << "] "
+ Log(category, LOGL_##level, __BASE_FILE__, __LINE__).get() << "[chan=" << chan << "] "
/**
A C++ stream-based thread-safe logger.
diff --git a/CommonLibs/debug.h b/CommonLibs/debug.h
index ddb5c75..71f344e 100644
--- a/CommonLibs/debug.h
+++ b/CommonLibs/debug.h
@@ -3,7 +3,6 @@
#include <stdbool.h>
#include <osmocom/core/logging.h>
-#include <osmocom/core/thread.h>
extern const struct log_info log_info;
@@ -19,10 +18,6 @@
DCTR,
};
-#define CLOGC(category, level, fmt, args...) do { \
- LOGP(category, level, "[tid=%ld] " fmt, (long int) osmo_gettid(), ##args); \
-} while(0)
-
#define CLOGCHAN(chan, category, level, fmt, args...) do { \
- LOGP(category, level, "[tid=%ld][chan=%zu] " fmt, (long int) osmo_gettid(), chan, ##args); \
+ LOGP(category, level, "[chan=%zu] " fmt, chan, ##args); \
} while(0)
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/23160
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ie98a21246230c946afc47f4f5b9c6618eefde494
Gerrit-Change-Number: 23160
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210301/b4f5748b/attachment.htm>