summaryrefslogtreecommitdiffstats
path: root/vespalog
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-01-12 14:50:24 +0000
committerArne Juul <arnej@yahooinc.com>2023-01-12 14:50:24 +0000
commit217e161ded940f2385e5ec9746f12863d86317b9 (patch)
treed590239ad881f0e195d9681162ebed7f3f0adb46 /vespalog
parentb341da3140312bce5a36e4365cbbe0dd656f2868 (diff)
remove extra macro used only once
Diffstat (limited to 'vespalog')
-rw-r--r--vespalog/src/vespa/log/log.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/vespalog/src/vespa/log/log.h b/vespalog/src/vespa/log/log.h
index 0ed11129c9b..22b6a720bd2 100644
--- a/vespalog/src/vespa/log/log.h
+++ b/vespalog/src/vespa/log/log.h
@@ -59,18 +59,16 @@ do { \
// Must use placement new in the following definition, since the variable
// "logger" must be a valid logger object DURING the construction of the
// logger object itself.
-#define LOG_INDIRECT_MUST \
+#define LOG_INDIRECT(level, ...) \
+do { \
if (!logInitialised) { \
logInitialised = true; \
ns_log_indirect_logger = \
static_cast<Logger *>( \
malloc(sizeof *ns_log_indirect_logger)); \
new (ns_log_indirect_logger) Logger(logName, indirectRcsId); \
- }
-#define LOG_INDIRECT(level, ...) \
-do { \
- LOG_INDIRECT_MUST \
- if (LOG_INDIRECT_WOULD_LOG(level)) { \
+ } \
+ if (LOG_INDIRECT_WOULD_LOG(level)) { \
ns_log_indirect_logger->doLog(ns_log::Logger::level, \
__FILE__, __LINE__, __VA_ARGS__); \
} \