From cb12ed5dd211f9910860e86fd937180895c459de Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 30 Jul 2012 13:06:44 +0200 Subject: omelasticsearch: improved debug logging --- plugins/omelasticsearch/omelasticsearch.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/omelasticsearch/omelasticsearch.c') diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c index fea85f22..48cfef7d 100644 --- a/plugins/omelasticsearch/omelasticsearch.c +++ b/plugins/omelasticsearch/omelasticsearch.c @@ -408,8 +408,11 @@ writeDataError(instanceData *pData, cJSON **pReplyRoot, uchar *reqmsg) char errStr[1024]; DEFiRet; - if(pData->errorFile == NULL) + if(pData->errorFile == NULL) { + DBGPRINTF("omelasticsearch: no local error logger defined - " + "ignoring ES error information\n"); FINALIZE; + } if(pData->fdErrFile == -1) { pData->fdErrFile = open((char*)pData->errorFile, @@ -478,7 +481,7 @@ DBGPRINTF("omelasticsearch: %d items in reply\n", numitems); ok = cJSON_GetObjectItem(create, "ok"); if(ok == NULL || ok->type != cJSON_True) { DBGPRINTF("omelasticsearch: error in elasticsearch reply: " - "item ok (%p) not ok\n", ok); + "item %d, prop ok (%p) not ok\n", i, ok); ABORT_FINALIZE(RS_RET_DATAFAIL); } } -- cgit v1.2.3