diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-27 12:52:45 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-27 12:52:45 +0200 |
commit | 3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2 (patch) | |
tree | a147c4dbda59de0675b0c2a5e80a2b6f97569691 /runtime/rsyslog.c | |
parent | d4518082362afebef9400bcbf46e38228de83bf1 (diff) | |
download | rsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.tar.gz rsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.tar.bz2 rsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.zip |
added (internal) error codes to error messages
Also added redirector to web description of error codes
closes bug http://bugzilla.adiscon.com/show_bug.cgi?id=20
Diffstat (limited to 'runtime/rsyslog.c')
-rw-r--r-- | runtime/rsyslog.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/rsyslog.c b/runtime/rsyslog.c index c05119d8..54db12c2 100644 --- a/runtime/rsyslog.c +++ b/runtime/rsyslog.c @@ -79,11 +79,11 @@ #include "errmsg.h" /* forward definitions */ -static rsRetVal dfltErrLogger(uchar *errMsg); +static rsRetVal dfltErrLogger(int, uchar *errMsg); /* globally visible static data - see comment in rsyslog.h for details */ uchar *glblModPath; /* module load path */ -rsRetVal (*glblErrLogger)(uchar*) = dfltErrLogger; /* the error logger to use by the errmsg module */ +rsRetVal (*glblErrLogger)(int, 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) @@ -95,10 +95,10 @@ 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(uchar *errMsg) +static rsRetVal dfltErrLogger(int iErr, uchar *errMsg) { DEFiRet; - fprintf(stderr, "rsyslog runtime error: %s\n", errMsg); + fprintf(stderr, "rsyslog runtime error(%d): %s\n", iErr, errMsg); RETiRet; } @@ -107,7 +107,7 @@ static rsRetVal dfltErrLogger(uchar *errMsg) * rgerhards, 2008-04-18 */ rsRetVal -rsrtSetErrLogger(rsRetVal (*errLogger)(uchar*)) +rsrtSetErrLogger(rsRetVal (*errLogger)(int, uchar*)) { DEFiRet; assert(errLogger != NULL); |