diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-19 14:58:31 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-04-19 14:58:31 +0200 |
commit | 28e750eebd8ccb5655bdc18693b3b7c9d9ad826b (patch) | |
tree | 11881ce81be60ed10d1126f09390afe50f168531 /runtime/rsconf.c | |
parent | 542fd3300671a2480ff009e060b32f08fed44b4d (diff) | |
download | rsyslog-28e750eebd8ccb5655bdc18693b3b7c9d9ad826b.tar.gz rsyslog-28e750eebd8ccb5655bdc18693b3b7c9d9ad826b.tar.bz2 rsyslog-28e750eebd8ccb5655bdc18693b3b7c9d9ad826b.zip |
step: slowly migrating config settings... ;)
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r-- | runtime/rsconf.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c index 27d89fb6..d68420bf 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -2,7 +2,7 @@ * * Module begun 2011-04-19 by Rainer Gerhards * - * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH. + * Copyright 2011 by Rainer Gerhards and Adiscon GmbH. * * This file is part of the rsyslog runtime library. * @@ -33,15 +33,24 @@ #include "obj.h" #include "srUtils.h" #include "ruleset.h" +#include "modules.h" #include "rsconf.h" +#include "cfsysline.h" /* static data */ DEFobjStaticHelpers +DEFobjCurrIf(ruleset) +DEFobjCurrIf(module) /* Standard-Constructor */ BEGINobjConstruct(rsconf) /* be sure to specify the object type also in END macro! */ + pThis->globals.bDebugPrintTemplateList = 1; + pThis->globals.bDebugPrintModuleList = 1; + pThis->globals.bDebugPrintCfSysLineHandlerList = 1; + pThis->globals.bLogStatusMsgs = DFLT_bLogStatusMsgs; + pThis->globals.bErrMsgToStderr = 1; pThis->templates.root = NULL; pThis->templates.last = NULL; pThis->templates.lastStatic = NULL; @@ -71,6 +80,26 @@ ENDobjDestruct(rsconf) /* DebugPrint support for the rsconf object */ BEGINobjDebugPrint(rsconf) /* be sure to specify the object type also in END and CODESTART macros! */ + dbgprintf("configuration object %p\n", pThis); + dbgprintf("Global Settings:\n"); + dbgprintf(" bDebugPrintTemplateList.............: %d\n", + pThis->globals.bDebugPrintTemplateList); + dbgprintf(" bDebugPrintModuleList : %d\n", + pThis->globals.bDebugPrintModuleList); + dbgprintf(" bDebugPrintCfSysLineHandlerList.....: %d\n", + pThis->globals.bDebugPrintCfSysLineHandlerList); + dbgprintf(" bLogStatusMsgs : %d\n", + pThis->globals.bLogStatusMsgs); + dbgprintf(" bErrMsgToStderr.....................: %d\n", + pThis->globals.bErrMsgToStderr); + ruleset.DebugPrintAll(pThis); + DBGPRINTF("\n"); + if(pThis->globals.bDebugPrintTemplateList) + tplPrintList(pThis); + if(pThis->globals.bDebugPrintModuleList) + module.PrintList(); + if(pThis->globals.bDebugPrintCfSysLineHandlerList) + dbgPrintCfSysLineHandlers(); CODESTARTobjDebugPrint(rsconf) ENDobjDebugPrint(rsconf) @@ -102,6 +131,8 @@ ENDobjQueryInterface(rsconf) */ BEGINObjClassInit(rsconf, 1, OBJ_IS_CORE_MODULE) /* class, version */ /* request objects we use */ + CHKiRet(objUse(ruleset, CORE_COMPONENT)); + CHKiRet(objUse(module, CORE_COMPONENT)); /* now set our own handlers */ OBJSetMethodHandler(objMethod_DEBUGPRINT, rsconfDebugPrint); @@ -112,6 +143,8 @@ ENDObjClassInit(rsconf) /* De-initialize the rsconf class. */ BEGINObjClassExit(rsconf, OBJ_IS_CORE_MODULE) /* class, version */ + objRelease(ruleset, CORE_COMPONENT); + objRelease(module, CORE_COMPONENT); ENDObjClassExit(rsconf) /* vi:set ai: |