diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-07-05 09:22:58 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-07-05 09:22:58 +0200 |
commit | 39aa8eb08a1b4c297dabf829690b6fcc05707c21 (patch) | |
tree | 0f0306356e37436d420abf507561630810a8758b /plugins/omrelp/omrelp.c | |
parent | a6094cf1806170326a4ccb2ae379dffa3ad8924d (diff) | |
download | rsyslog-39aa8eb08a1b4c297dabf829690b6fcc05707c21.tar.gz rsyslog-39aa8eb08a1b4c297dabf829690b6fcc05707c21.tar.bz2 rsyslog-39aa8eb08a1b4c297dabf829690b6fcc05707c21.zip |
make use of new librelp generic error reporting facility
This leads to more error messages being passed to the user and
thus simplified troubleshooting.
librelp 1.2.0 is now required
Diffstat (limited to 'plugins/omrelp/omrelp.c')
-rw-r--r-- | plugins/omrelp/omrelp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c index 898bafe2..34511e46 100644 --- a/plugins/omrelp/omrelp.c +++ b/plugins/omrelp/omrelp.c @@ -142,6 +142,14 @@ onErr(void *pUsr, char *objinfo, char* errmesg, __attribute__((unused)) relpRetV } static void +onGenericErr(char *objinfo, char* errmesg, __attribute__((unused)) relpRetVal errcode) +{ + errmsg.LogError(0, RS_RET_RELP_ERR, "omrelp: librelp error '%s', object " + "'%s' - action may not work as intended", + errmesg, objinfo); +} + +static void onAuthErr(void *pUsr, char *authinfo, char* errmesg, __attribute__((unused)) relpRetVal errcode) { instanceData *pData = (instanceData*) pUsr; @@ -554,6 +562,7 @@ CODEmodInit_QueryRegCFSLineHdlr CHKiRet(relpEngineConstruct(&pRelpEngine)); CHKiRet(relpEngineSetDbgprint(pRelpEngine, dbgprintf)); CHKiRet(relpEngineSetOnAuthErr(pRelpEngine, onAuthErr)); + CHKiRet(relpEngineSetOnGenericErr(pRelpEngine, onGenericErr)); CHKiRet(relpEngineSetOnErr(pRelpEngine, onErr)); CHKiRet(relpEngineSetEnableCmd(pRelpEngine, (uchar*) "syslog", eRelpCmdState_Required)); |