summaryrefslogtreecommitdiff
path: root/logger.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-06 21:57:45 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-06 21:57:45 +0200
commit16801e901e87f4ca0c83ea8c09df1ab3d344129e (patch)
tree09c3a711afa32696f2545fd534abb324d151569b /logger.c
parenta04f58d6cb678a574e85a26c453aeb6c7884bb93 (diff)
log: rework logging subsystem to support syslog and kmsg output
Diffstat (limited to 'logger.c')
-rw-r--r--logger.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/logger.c b/logger.c
index 46cce5f09d..7194320c47 100644
--- a/logger.c
+++ b/logger.c
@@ -62,11 +62,6 @@ typedef enum StreamState {
STREAM_RUNNING
} StreamState;
-typedef enum LogTarget {
- LOG_TARGET_SYSLOG,
- LOG_TARGET_KMSG
-} LogTarget;
-
struct Stream {
Server *server;
@@ -89,7 +84,6 @@ struct Stream {
static int stream_log(Stream *s, char *p, usec_t timestamp) {
char header_priority[16], header_time[64], header_pid[16];
- struct msghdr msghdr;
struct iovec iovec[5];
assert(s);
@@ -133,6 +127,8 @@ static int stream_log(Stream *s, char *p, usec_t timestamp) {
IOVEC_SET_STRING(iovec[0], header_priority);
if (s->target == LOG_TARGET_SYSLOG) {
+ struct msghdr msghdr;
+
IOVEC_SET_STRING(iovec[1], header_time);
IOVEC_SET_STRING(iovec[2], s->process);
IOVEC_SET_STRING(iovec[3], header_pid);