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/imrelp/imrelp.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/imrelp/imrelp.c')
-rw-r--r-- | plugins/imrelp/imrelp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c index 41d96fe1..d04e41e1 100644 --- a/plugins/imrelp/imrelp.c +++ b/plugins/imrelp/imrelp.c @@ -157,6 +157,13 @@ 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, "imrelp: librelp error '%s', object " + " '%s' - input may not work as intended", errmesg, objinfo); +} + +static void onAuthErr(void *pUsr, char *authinfo, char* errmesg, __attribute__((unused)) relpRetVal errcode) { instanceConf_t *inst = (instanceConf_t*) pUsr; @@ -288,6 +295,7 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst) CHKiRet(relpEngineSetEnableCmd(pRelpEngine, (uchar*) "syslog", eRelpCmdState_Required)); CHKiRet(relpEngineSetSyslogRcv2(pRelpEngine, onSyslogRcv)); CHKiRet(relpEngineSetOnErr(pRelpEngine, onErr)); + CHKiRet(relpEngineSetOnGenericErr(pRelpEngine, onGenericErr)); CHKiRet(relpEngineSetOnAuthErr(pRelpEngine, onAuthErr)); if (!glbl.GetDisableDNS()) { CHKiRet(relpEngineSetDnsLookupMode(pRelpEngine, 1)); |