From ab1c659fd51efb22f3e92004c82ec66cdcf28fb2 Mon Sep 17 00:00:00 2001 From: Mikko Koppanen Date: Sun, 20 Jun 2010 23:01:38 +0100 Subject: [PATCH] Added more meaningful info message --- src/mongodb_store.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mongodb_store.cpp b/src/mongodb_store.cpp index 3925822e..292b7bd2 100644 --- a/src/mongodb_store.cpp +++ b/src/mongodb_store.cpp @@ -132,10 +132,7 @@ bool MongoDBStore::handleMessages(boost::shared_ptr messages) } string ns = database + "." + (categoryAsCollection ? categoryHandled : collection); - - LOG_OPER("[%s] MongoDB saving messages into %s", - categoryHandled.c_str(), ns.c_str()); - + for (logentry_vector_t::iterator iter = messages->begin(); iter != messages->end(); ++iter) { @@ -160,7 +157,10 @@ bool MongoDBStore::handleMessages(boost::shared_ptr messages) LOG_OPER("[%s] MongoDB store failed to write. Exception: %s", categoryHandled.c_str(), e.what()); } - } + } + + LOG_OPER("[%s] MongoDB stored <%ld> messages out of <%ld> into <%s>", + categoryHandled.c_str(), messagesHandled, messages->size(), ns.c_str()); if (!success && messagesHandled) { // Something went wrong but we have handled something probably