summaryrefslogtreecommitdiffstats
path: root/plugins/imklog/imklog.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-03 11:57:21 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-03 11:57:21 +0200
commitda933a7e105acf814d5e7955d39d29eab3a96613 (patch)
treeef8ee09015316a82e650a6d2805c2787dd36f83f /plugins/imklog/imklog.c
parentf03b26b550dc7a08f96753c47e8fb0673f5338ec (diff)
downloadrsyslog-da933a7e105acf814d5e7955d39d29eab3a96613.tar.gz
rsyslog-da933a7e105acf814d5e7955d39d29eab3a96613.tar.xz
rsyslog-da933a7e105acf814d5e7955d39d29eab3a96613.zip
added $klogConsoleLogLevel directive
...which permits to set a new console log level while rsyslog is active
Diffstat (limited to 'plugins/imklog/imklog.c')
-rw-r--r--plugins/imklog/imklog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
index 2a832bee..7994c5eb 100644
--- a/plugins/imklog/imklog.c
+++ b/plugins/imklog/imklog.c
@@ -73,6 +73,7 @@ int symbol_lookup = 0; /* on recent kernels > 2.6, the kernel does this */
int bPermitNonKernel = 0; /* permit logging of messages not having LOG_KERN facility */
int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */
uchar *pszPath = NULL;
+int console_log_level = -1;
/* TODO: configuration for the following directives must be implemented. It
* was not done yet because we either do not yet have a config handler for
* that type or I thought it was acceptable to push it to a later stage when
@@ -80,7 +81,6 @@ uchar *pszPath = NULL;
* changes resulting from that). -- rgerhards, 2007-12-20
*/
char *symfile = NULL;
-int console_log_level = -1;
static prop_t *pInputName = NULL; /* there is only one global inputName for all messages generated by this module */
@@ -303,6 +303,7 @@ CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogsymbolstwice", 0, eCmdHdlrBinary, NULL, &symbols_twice, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogusesyscallinterface", 0, eCmdHdlrBinary, NULL, &use_syscall, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogpermitnonkernelfacility", 0, eCmdHdlrBinary, NULL, &bPermitNonKernel, STD_LOADABLE_MODULE_ID));
+ CHKiRet(omsdRegCFSLineHdlr((uchar *)"klogconsoleloglevel", 0, eCmdHdlrInt, NULL, &console_log_level, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"kloginternalmsgfacility", 0, eCmdHdlrFacility, NULL, &iFacilIntMsg, STD_LOADABLE_MODULE_ID));
CHKiRet(omsdRegCFSLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID));
ENDmodInit