diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-01 11:54:55 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-01 11:54:55 +0000 |
commit | 727a41859ccce3ffd04d2372d8e23b9c516d01a0 (patch) | |
tree | e81246291f33b1ec61ce94175a0c146b37e22674 /klogd.c | |
parent | bc354a03db1e41410a92b291d834be784fe55ab5 (diff) | |
download | rsyslog-727a41859ccce3ffd04d2372d8e23b9c516d01a0.tar.gz rsyslog-727a41859ccce3ffd04d2372d8e23b9c516d01a0.tar.xz rsyslog-727a41859ccce3ffd04d2372d8e23b9c516d01a0.zip |
modified rklogd to only change the console log level if -c is specified
Diffstat (limited to 'klogd.c')
-rw-r--r-- | klogd.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -298,7 +298,7 @@ static int kmsg, terminate = 0, caught_TSTP = 0, reload_symbols = 0, - console_log_level = 6; + console_log_level = -1; static int use_syscall = 0, one_shot = 0, @@ -568,7 +568,8 @@ static enum LOGSRC GetKernelLogSrc(void) auto struct stat sb; /* Set level of kernel console messaging.. */ - if ( (ksyslog(8, NULL, console_log_level) < 0) && \ + if ( (console_log_level != -1) && + (ksyslog(8, NULL, console_log_level) < 0) && (errno == EINVAL) ) { /* @@ -579,7 +580,6 @@ static enum LOGSRC GetKernelLogSrc(void) */ Syslog(LOG_WARNING, "Cannot set console log level - disabling " "console output."); - ksyslog(6, NULL, 0); } /* |