diff options
Diffstat (limited to 'src/shared/log.h')
-rw-r--r-- | src/shared/log.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/shared/log.h b/src/shared/log.h index 278010432d..3a4d1134a1 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -199,7 +199,10 @@ bool log_on_console(void) _pure_; const char *log_target_to_string(LogTarget target) _const_; LogTarget log_target_from_string(const char *s) _pure_; -#define MESSAGE_ID(x) "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(x) +/* Helpers to prepare various fields for structured logging */ +#define LOG_MESSAGE(fmt, ...) "MESSAGE=" fmt, ##__VA_ARGS__ +#define LOG_MESSAGE_ID(x) "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(x) +#define LOG_ERRNO(error) "ERRNO=%i", error void log_received_signal(int level, const struct signalfd_siginfo *si); |