summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-01 12:10:13 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-01 12:10:13 +0000
commitdf2c0a2e6f5f9c601fc7888e6d4f7820490be4a0 (patch)
treeda71b72625c001c110c04eed629cf854c053cbb7
parent0814450a39ba30e386f7ab34307d2eee1de4e865 (diff)
downloadrsyslog-df2c0a2e6f5f9c601fc7888e6d4f7820490be4a0.tar.gz
rsyslog-df2c0a2e6f5f9c601fc7888e6d4f7820490be4a0.tar.xz
rsyslog-df2c0a2e6f5f9c601fc7888e6d4f7820490be4a0.zip
modified rklogd to only change the console log level if -c is specified
-rw-r--r--klogd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/klogd.c b/klogd.c
index 0a9621a0..d32610e9 100644
--- a/klogd.c
+++ b/klogd.c
@@ -414,8 +414,11 @@ extern void Syslog(int priority, char *fmt, ...)
static void CloseLogSrc(void)
{
- /* Turn on logging of messages to console. */
- ksyslog(7, NULL, 0);
+ /* Turn on logging of messages to console, but only if we had the -c
+ * option -- rgerhards, 2007-08-01
+ */
+ if (console_log_level != -1)
+ ksyslog(7, NULL, 0);
/* Shutdown the log sources. */
switch ( logsrc )