From fdf9f9bbe4dc3281bc8799e2a1f8709776c8cad8 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 5 Jan 2013 11:59:46 -0500 Subject: journal: new logging macros to include UNIT= Adding UNIT= to log lines allows them to be shown in 'systemctl status' output, etc. A new set of macros and functions is added. This allows for less verbose notation than using log_struct() explicitly. The set of logging functions is expanded to take a pair of arguments (e.g. "UNIT=" and the RHS) which add an extra line to the structured log entry. This can be used to add macros which add a different identifier later on. --- src/shared/log.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/shared/log.h') diff --git a/src/shared/log.h b/src/shared/log.h index 5c946faf51..9aafcb4100 100644 --- a/src/shared/log.h +++ b/src/shared/log.h @@ -85,6 +85,25 @@ int log_metav( const char *format, va_list ap); +int log_meta_object( + int level, + const char*file, + int line, + const char *func, + const char *object_name, + const char *object, + const char *format, ...) _printf_attr_(7,8); + +int log_metav_object( + int level, + const char*file, + int line, + const char *func, + const char *object_name, + const char *object, + const char *format, + va_list ap); + int log_struct_internal( int level, const char *file, -- cgit v1.2.3-54-g00ecf