aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wsutil/wslog.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/wsutil/wslog.h b/wsutil/wslog.h
index bac0a53c93..65d0db4385 100644
--- a/wsutil/wslog.h
+++ b/wsutil/wslog.h
@@ -20,6 +20,12 @@
#include <ws_log_defs.h>
+#ifdef WS_LOG_DOMAIN
+#define _LOG_DOMAIN WS_LOG_DOMAIN
+#else
+#define _LOG_DOMAIN ""
+#endif
+
/*
* Define the macro WS_LOG_DOMAIN *before* including this header,
* for example:
@@ -228,13 +234,8 @@ void ws_logv_full(const char *domain, enum ws_log_level level,
const char *format, va_list ap);
-#ifdef WS_LOG_DOMAIN
-#define _LOG_FULL(level, ...) ws_log_full(WS_LOG_DOMAIN, level, \
- __FILE__, __LINE__, G_STRFUNC, __VA_ARGS__)
-#else
-#define _LOG_FULL(level, ...) ws_log_full(NULL, level, \
+#define _LOG_FULL(level, ...) ws_log_full(_LOG_DOMAIN, level, \
__FILE__, __LINE__, G_STRFUNC, __VA_ARGS__)
-#endif
/** Logs with "error" level.
*