summaryrefslogtreecommitdiffstats
path: root/runtime/glbl.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-02-27 17:38:36 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-02-27 17:38:36 +0100
commit84d9283b9fc3492654d637a3941f4dde6c9d46e7 (patch)
tree846096a414c160991935ce73fd647ae63e371adc /runtime/glbl.c
parent14efde3492026d0a37f2e89736772ec884e3ae2d (diff)
parent8700672c769084dea7d85158f497e3b9a9942c12 (diff)
downloadrsyslog-84d9283b9fc3492654d637a3941f4dde6c9d46e7.tar.gz
rsyslog-84d9283b9fc3492654d637a3941f4dde6c9d46e7.tar.bz2
rsyslog-84d9283b9fc3492654d637a3941f4dde6c9d46e7.zip
Merge branch 'master' into master-omjournal
Diffstat (limited to 'runtime/glbl.c')
-rw-r--r--runtime/glbl.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/runtime/glbl.c b/runtime/glbl.c
index 727f8392..b3fe3a1d 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
@@ -279,6 +279,28 @@ finalize_it:
RETiRet;
}
+
+static rsRetVal
+setDebugFile(void __attribute__((unused)) *pVal, uchar *pNewVal)
+{
+ DEFiRet;
+ dbgSetDebugFile(pNewVal);
+ free(pNewVal);
+ RETiRet;
+}
+
+
+static rsRetVal
+setDebugLevel(void __attribute__((unused)) *pVal, int level)
+{
+ DEFiRet;
+ dbgSetDebugLevel(level);
+ dbgprintf("debug level %d set via config file\n", level);
+ dbgprintf("This is rsyslog version " VERSION "\n");
+ RETiRet;
+}
+
+
/* return our local IP.
* If no local IP is set, "127.0.0.1" is selected *and* set. This
* is an intensional side effect that we do in order to keep things
@@ -611,6 +633,8 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_IS_CORE_MODULE) /* class, version */
CHKiRet(objUse(errmsg, CORE_COMPONENT));
/* config handlers are never unregistered and need not be - we are always loaded ;) */
+ CHKiRet(regCfSysLineHdlr((uchar *)"debugfile", 0, eCmdHdlrGetWord, setDebugFile, NULL, NULL));
+ CHKiRet(regCfSysLineHdlr((uchar *)"debuglevel", 0, eCmdHdlrInt, setDebugLevel, NULL, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"workdirectory", 0, eCmdHdlrGetWord, setWorkDir, NULL, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"dropmsgswithmaliciousdnsptrrecords", 0, eCmdHdlrBinary, NULL, &bDropMalPTRMsgs, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdriver", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvr, NULL));