diff options
Diffstat (limited to 'runtime/rsyslog.c')
-rw-r--r-- | runtime/rsyslog.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/runtime/rsyslog.c b/runtime/rsyslog.c index 6523ae6d..310d7a1d 100644 --- a/runtime/rsyslog.c +++ b/runtime/rsyslog.c @@ -86,11 +86,11 @@ int default_thr_sched_policy; #endif /* forward definitions */ -static rsRetVal dfltErrLogger(const int, const uchar *errMsg); +static void dfltErrLogger(const int, const int, const uchar *errMsg); /* globally visible static data - see comment in rsyslog.h for details */ uchar *glblModPath; /* module load path */ -rsRetVal (*glblErrLogger)(const int, const uchar*) = dfltErrLogger; /* the error logger to use by the errmsg module */ +void (*glblErrLogger)(const int, const int, const uchar*) = dfltErrLogger; /* the error logger to use by the errmsg module */ /* static data */ static int iRefCount = 0; /* our refcount - it MUST exist only once inside a process (not thread) @@ -102,24 +102,21 @@ static int iRefCount = 0; /* our refcount - it MUST exist only once inside a pro * default so that we can log errors during the intial phase, most importantly * during initialization. -- rgerhards. 2008-04-17 */ -static rsRetVal dfltErrLogger(const int iErr, const uchar *errMsg) +static void +dfltErrLogger(const int severity, const int iErr, const uchar *errMsg) { - DEFiRet; - fprintf(stderr, "rsyslog runtime error(%d): %s\n", iErr, errMsg); - RETiRet; + fprintf(stderr, "rsyslog runtime error(%d,%d): %s\n", severity, iErr, errMsg); } /* set the error log function * rgerhards, 2008-04-18 */ -rsRetVal -rsrtSetErrLogger(rsRetVal (*errLogger)(int, const uchar*)) +void +rsrtSetErrLogger(void (*errLogger)(const int, const int, const uchar*)) { - DEFiRet; assert(errLogger != NULL); glblErrLogger = errLogger; - RETiRet; } |