X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Flog.h;h=899474daad8148b5e89b2e6d5d163ea19c1a8b59;hb=2ed028df72f5995acfbeca89db3f056d0e83cac1;hp=1201022ddc222396fcb1a80f8e824b7a624fddc1;hpb=68def6bc80ba50ed3b3658d00799a3ec295c4d7a;p=elogind.git diff --git a/src/basic/log.h b/src/basic/log.h index 1201022dd..899474daa 100644 --- a/src/basic/log.h +++ b/src/basic/log.h @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - #pragma once /*** @@ -26,6 +24,7 @@ #include #include #include +#include #include #include "sd-id128.h" @@ -36,8 +35,7 @@ typedef enum LogTarget{ LOG_TARGET_CONSOLE, LOG_TARGET_CONSOLE_PREFIXED, LOG_TARGET_KMSG, -/// elogind does not support logging to systemd-journald -#if 0 +#if 0 /// elogind does not support logging to systemd-journald LOG_TARGET_JOURNAL, LOG_TARGET_JOURNAL_OR_KMSG, #endif // 0 @@ -133,6 +131,15 @@ int log_oom_internal( int line, const char *func); +int log_format_iovec( + struct iovec *iovec, + unsigned iovec_len, + unsigned *n, + bool newline_separator, + int error, + const char *format, + va_list ap); + /* This modifies the buffer passed! */ int log_dump_internal( int level, @@ -252,5 +259,4 @@ int log_syntax_internal( log_syntax_internal(unit, _level, config_file, config_line, 0, __FILE__, __LINE__, __func__, \ "String is not UTF-8 clean, ignoring assignment: %s", strna(_p)); \ } \ - -EINVAL; \ })