summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2009-03-20 01:30:38 +0000
committerHenri Herscher <henri@oreka.org>2009-03-20 01:30:38 +0000
commit3410cd29fb08f193b5140448a31479546f088c94 (patch)
tree8c10e3c660e9c103b3c11f47181fe908237ca5b2
parent928be2e2d61b99d6de757e7b76a39e1eec1340f7 (diff)
Improved logging, in particular, tape messages are now logged with full details at enqueueing time, not just sending time.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@607 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r--orkbasecxx/Reporting.cpp8
-rw-r--r--orkbasecxx/filters/audiogain/AudioGain.cpp4
2 files changed, 7 insertions, 5 deletions
diff --git a/orkbasecxx/Reporting.cpp b/orkbasecxx/Reporting.cpp
index d0ffa40..f1bbf20 100644
--- a/orkbasecxx/Reporting.cpp
+++ b/orkbasecxx/Reporting.cpp
@@ -171,17 +171,19 @@ void Reporting::AddTapeMessage(MessageRef& messageRef)
// Copy the tags!
std::copy(pTapeMsg->m_tags.begin(), pTapeMsg->m_tags.end(), std::inserter(pRptTapeMsg->m_tags, pRptTapeMsg->m_tags.begin()));
+ CStdString msgAsSingleLineString = reportingMsgRef->SerializeSingleLine();
+
if(reportingThread->m_messageQueue.push(reportingMsgRef))
{
reportingThread->m_queueFullError = false;
- logMsg.Format("[%s] added %s tape message to queue: %s", reportingThread->m_threadId, pTapeMsg->m_stage, pTapeMsg->m_recId);
+ logMsg.Format("[%s] enqueued: %s", reportingThread->m_threadId, msgAsSingleLineString);
LOG4CXX_INFO(LOG.reportingLog, logMsg);
}
else
{
if(reportingThread->m_queueFullError == false)
{
- logMsg.Format("[%s] queue full, could not add tape message %s", reportingThread->m_threadId, pTapeMsg->m_recId);
+ logMsg.Format("[%s] queue full, rejected: %s", reportingThread->m_threadId, msgAsSingleLineString);
LOG4CXX_WARN(LOG.reportingLog, logMsg);
reportingThread->m_queueFullError = true;
}
@@ -332,7 +334,7 @@ void ReportingThread::Run()
}
CStdString msgAsSingleLineString = msgRef->SerializeSingleLine();
- LOG4CXX_INFO(LOG.reportingLog, "[" + m_threadId + "] " + msgAsSingleLineString);
+ LOG4CXX_INFO(LOG.reportingLog, "[" + m_threadId + "] sending: " + msgAsSingleLineString);
OrkHttpSingleLineClient c;
TapeResponseRef tr(new TapeResponse());
diff --git a/orkbasecxx/filters/audiogain/AudioGain.cpp b/orkbasecxx/filters/audiogain/AudioGain.cpp
index 0976b98..4477324 100644
--- a/orkbasecxx/filters/audiogain/AudioGain.cpp
+++ b/orkbasecxx/filters/audiogain/AudioGain.cpp
@@ -21,7 +21,7 @@ AudioGainFilter::AudioGainFilter()
{
m_log = Logger::getLogger("audiogain");
m_numEncodingErrors = 0;
- LOG4CXX_INFO(this->m_log, "Initialized AudioGain filter");
+ LOG4CXX_DEBUG(this->m_log, "Initialized AudioGain filter");
}
AudioGainFilter::~AudioGainFilter()
@@ -32,7 +32,7 @@ AudioGainFilter::~AudioGainFilter()
logMsg.Format("Encoding error happened %d time(s)", m_numEncodingErrors);
LOG4CXX_WARN(m_log, logMsg);
}
- LOG4CXX_INFO(this->m_log, "Decommissioned AudioGain filter");
+ LOG4CXX_DEBUG(this->m_log, "Decommissioned AudioGain filter");
}
FilterRef AudioGainFilter::Instanciate()