summaryrefslogtreecommitdiff
path: root/src/basic/log.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-11-08 14:05:55 -0500
committerSven Eden <yamakuzure@gmx.net>2017-05-17 15:22:13 +0200
commit1e2a451e2c0fcfe05875cb4f7ebe0461f66b97e0 (patch)
treef56d4784605215e5d32def6ca06b448ee03a911f /src/basic/log.h
parentc89a2e44aa8704e182882aca368f9e911bfa22fd (diff)
journald: allow additional payload in server_driver_message
The code to format the iovec is shared with log.c. All call sites to server_driver_message are changed to include the additional "MESSAGE=" part, but the new functionality is not used and change in functionality is not expected. iovec is preallocated, so the maximum number of messages is limited. In server_driver_message N_IOVEC_PAYLOAD_FIELDS is currently set to 1. New code is not oom safe, it will fail if memory cannot be allocated. This will be fixed in subsequent commit.
Diffstat (limited to 'src/basic/log.h')
-rw-r--r--src/basic/log.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/basic/log.h b/src/basic/log.h
index 0a7acb98e..d5bf3960f 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -26,6 +26,7 @@
#include <stdbool.h>
#include <stdlib.h>
#include <sys/signalfd.h>
+#include <sys/socket.h>
#include <syslog.h>
#include "sd-id128.h"
@@ -132,6 +133,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,