diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 14:53:25 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-05 14:53:25 +0000 |
commit | 24b02dc831889986211600a75572737e733ef9d8 (patch) | |
tree | 50e1525e5749c8b6e51969d8ff88060a172b0497 /obj.c | |
parent | 213e0b596205626214891fb46e1a780af7f26a8b (diff) | |
download | rsyslog-24b02dc831889986211600a75572737e733ef9d8.tar.gz rsyslog-24b02dc831889986211600a75572737e733ef9d8.tar.xz rsyslog-24b02dc831889986211600a75572737e733ef9d8.zip |
- extracted logerror*() family of functions from syslogd, made them their
own class and converted to new object calling conventions
(interface-based)
- converted gss-misc into a loadable library module
Diffstat (limited to 'obj.c')
-rw-r--r-- | obj.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -84,11 +84,13 @@ #include "obj.h" #include "stream.h" #include "modules.h" +#include "errmsg.h" /* static data */ DEFobjCurrIf(obj) /* we define our own interface, as this is expected by some macros! */ DEFobjCurrIf(var) DEFobjCurrIf(module) +DEFobjCurrIf(errmsg) static objInfo_t *arrObjInfo[OBJ_NUM_IDS]; /* array with object information pointers */ @@ -1036,7 +1038,8 @@ RegisterObj(uchar *pszObjName, objInfo_t *pInfo) finalize_it: if(iRet != RS_RET_OK) { - logerrorVar("registering object '%s' failed with error code %d", pszObjName, iRet); +RUNLOG_VAR("%p", errmsg.LogError); + errmsg.LogError(NO_ERRCODE, "registering object '%s' failed with error code %d", pszObjName, iRet); } RETiRet; @@ -1154,10 +1157,16 @@ objClassInit(void) CHKiRet(objGetObjInterface(&obj)); /* get ourselves ;) */ /* init classes we use (limit to as few as possible!) */ +RUNLOG_VAR("%p", errmsg.LogError); + CHKiRet(errmsgClassInit()); + CHKiRet(cfsyslineInit()); CHKiRet(varClassInit()); CHKiRet(moduleClassInit()); CHKiRet(objUse(var, CORE_COMPONENT)); CHKiRet(objUse(module, CORE_COMPONENT)); +RUNLOG_VAR("%p", errmsg.LogError); + CHKiRet(objUse(errmsg, CORE_COMPONENT)); +RUNLOG_VAR("%p", errmsg.LogError); finalize_it: RETiRet; |