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 /plugins/ompgsql | |
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 'plugins/ompgsql')
-rw-r--r-- | plugins/ompgsql/ompgsql.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/ompgsql/ompgsql.c b/plugins/ompgsql/ompgsql.c index 77fd6a07..f8685672 100644 --- a/plugins/ompgsql/ompgsql.c +++ b/plugins/ompgsql/ompgsql.c @@ -113,7 +113,7 @@ static void reportDBError(instanceData *pData, int bSilent) /* output log message */ errno = 0; if(pData->f_hpgsql == NULL) { - errmsg.LogError(NO_ERRCODE, "unknown DB error occured - could not obtain PgSQL handle"); + errmsg.LogError(0, NO_ERRCODE, "unknown DB error occured - could not obtain PgSQL handle"); } else { /* we can ask pgsql for the error description... */ ePgSQLStatus = PQstatus(pData->f_hpgsql); snprintf(errMsg, sizeof(errMsg)/sizeof(char), "db error (%d): %s\n", ePgSQLStatus, @@ -122,7 +122,7 @@ static void reportDBError(instanceData *pData, int bSilent) dbgprintf("pgsql, DBError(silent): %s\n", errMsg); else { pData->eLastPgSQLStatus = ePgSQLStatus; - errmsg.LogError(NO_ERRCODE, "%s", errMsg); + errmsg.LogError(0, NO_ERRCODE, "%s", errMsg); } } @@ -264,7 +264,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1) * Retries make no sense. */ if (iPgSQLPropErr) { - errmsg.LogError(NO_ERRCODE, "Trouble with PgSQL connection properties. -PgSQL logging disabled"); + errmsg.LogError(0, RS_RET_INVALID_PARAMS, "Trouble with PgSQL connection properties. -PgSQL logging disabled"); ABORT_FINALIZE(RS_RET_INVALID_PARAMS); } else { CHKiRet(initPgSQL(pData, 0)); |