diff options
Diffstat (limited to 'runtime/rsyslog.c')
-rw-r--r-- | runtime/rsyslog.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/runtime/rsyslog.c b/runtime/rsyslog.c index 53c7855a..a3d4057e 100644 --- a/runtime/rsyslog.c +++ b/runtime/rsyslog.c @@ -35,7 +35,7 @@ * * Module begun 2008-04-16 by Rainer Gerhards * - * Copyright 2008 Rainer Gerhards and Adiscon GmbH. + * Copyright 2008-2013 Rainer Gerhards and Adiscon GmbH. * * This file is part of the rsyslog runtime library. * @@ -86,11 +86,11 @@ int default_thr_sched_policy; #endif /* forward definitions */ -static rsRetVal dfltErrLogger(int, 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)(int, 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(int iErr, 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, uchar*)) +void +rsrtSetErrLogger(void (*errLogger)(const int, const int, const uchar*)) { - DEFiRet; assert(errLogger != NULL); glblErrLogger = errLogger; - RETiRet; } |