summaryrefslogtreecommitdiffstats
path: root/plugins/omoracle
diff options
context:
space:
mode:
authorLuis Fernando Munoz Mejias <Luis.Fernando.Munoz.Mejias@cern.ch>2009-11-12 14:45:05 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-12 14:45:05 +0100
commit774fdc6c799e9671c8e0eac5271a83a3f8fb4646 (patch)
tree0d136852320eb0533308ad0ef60f9ea1b02e6213 /plugins/omoracle
parent4be35fbc60c94ee504f5a0428270b59d8438c9f4 (diff)
downloadrsyslog-774fdc6c799e9671c8e0eac5271a83a3f8fb4646.tar.gz
rsyslog-774fdc6c799e9671c8e0eac5271a83a3f8fb4646.tar.xz
rsyslog-774fdc6c799e9671c8e0eac5271a83a3f8fb4646.zip
Improve the debug messages
Improve traceability while testing.
Diffstat (limited to 'plugins/omoracle')
-rw-r--r--plugins/omoracle/omoracle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/omoracle/omoracle.c b/plugins/omoracle/omoracle.c
index c3acfb38..31e498f7 100644
--- a/plugins/omoracle/omoracle.c
+++ b/plugins/omoracle/omoracle.c
@@ -346,23 +346,23 @@ static void log_detailed_err(instanceData* pData)
OCIAttrGet(pData->statement, OCI_HTYPE_STMT, &errs, 0,
OCI_ATTR_NUM_DML_ERRORS, pData->error);
- dbgprintf("There were %d errors\n", errs);
+ errmsg.LogError(0, NO_ERRCODE, "%d errors in statement execution\n",
+ errs);
+ OCIHandleAlloc(pData->environment, &er, OCI_HTYPE_ERROR,
+ 0, NULL);
+ OCIHandleAlloc(pData->environment, &er2, OCI_HTYPE_ERROR,
+ 0, NULL);
for (i = 0; i < errs; i++) {
- dbgprintf("Allocating stuff %d\n", i);
- OCIHandleAlloc(pData->environment, &er2, OCI_HTYPE_ERROR,
- 0, NULL);
- dbgprintf("ParamGet %d\n", i);
OCIParamGet(pData->error, OCI_HTYPE_ERROR,
er2, &er, i);
- dbgprintf("AttrGet %d\n", i);
OCIAttrGet(er, OCI_HTYPE_ERROR, &row, 0,
OCI_ATTR_DML_ROW_OFFSET, er2);
- dbgprintf("ErrorGet %d\n", i);
OCIErrorGet(er, row, NULL, &code, buf, sizeof buf,
OCI_HTYPE_ERROR);
errmsg.LogError(0, NO_ERRCODE, "FAILURE DETAILS: %s", buf);
- OCIHandleFree(er2, OCI_HTYPE_ERROR);
}
+ OCIHandleFree(er, OCI_HTYPE_ERROR);
+ OCIHandleFree(er2, OCI_HTYPE_ERROR);
}