From f0e06c5f1a1f59d8ff19ee8a0a04bffb3b855a35 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 1 Feb 2010 12:02:59 -0800 Subject: [PATCH 2/2] I know Snort defaults to syslog in daemon mode, but should we? Stick to the logging configuration defined in the config file in daemon mode. --- src/util-daemon.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/src/util-daemon.c b/src/util-daemon.c index a9e28f3..067e190 100644 --- a/src/util-daemon.c +++ b/src/util-daemon.c @@ -63,15 +63,6 @@ static void WaitForChild (pid_t pid) { static void SetupLogging () { int fd0, fd1, fd2; - SCLogInitData *sc_lid = NULL; - SCLogOPIfaceCtx *sc_iface_ctx = NULL; - - sc_lid = SCLogAllocLogInitData(); - sc_lid->startup_message = "Daemon started"; - sc_lid->global_log_level = SC_LOG_INFO; - sc_iface_ctx = SCLogInitOPIfaceCtx("syslog", "%l", SC_LOG_INFO, "local5"); - SCLogAppendOPIfaceCtx(sc_iface_ctx, sc_lid); - /* Close stdin, stdout, stderr */ close(0); close(1); @@ -81,8 +72,6 @@ static void SetupLogging () { fd0 = open("/dev/null", O_RDWR); fd1 = dup(0); fd2 = dup(0); - - SCLogInitLogModule(sc_lid); } /** -- 1.6.6