summaryrefslogtreecommitdiffstats
path: root/plugins/ompgsql
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-06-27 12:52:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-06-27 12:52:45 +0200
commit3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2 (patch)
treea147c4dbda59de0675b0c2a5e80a2b6f97569691 /plugins/ompgsql
parentd4518082362afebef9400bcbf46e38228de83bf1 (diff)
downloadrsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.tar.gz
rsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.tar.xz
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.c6
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));