diff options
author | Henri Herscher <henri@oreka.org> | 2006-05-05 19:37:56 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2006-05-05 19:37:56 +0000 |
commit | 030f3d40121bc7e4c806f6460fe0674ed5fcba99 (patch) | |
tree | f4eaf78546afdbc5d1d1f3fe1e9bd16f8c46cc07 | |
parent | a279a59505abff5d2c0802feeeceeb4f08ee067c (diff) |
EnableReporting config parameter not used anymore, orkaudio always tries to report activity.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@225 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r-- | orkaudio/Reporting.cpp | 14 | ||||
-rw-r--r-- | orkaudio/Reporting.h | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/orkaudio/Reporting.cpp b/orkaudio/Reporting.cpp index 13d9c95..2be599e 100644 --- a/orkaudio/Reporting.cpp +++ b/orkaudio/Reporting.cpp @@ -23,6 +23,11 @@ Reporting Reporting::m_reportingSingleton; +Reporting::Reporting() +{ + m_queueFullError = false; +} + Reporting* Reporting::GetInstance() { return &m_reportingSingleton; @@ -33,10 +38,15 @@ void Reporting::AddAudioTape(AudioTapeRef audioTapeRef) if (m_audioTapeQueue.push(audioTapeRef)) { LOG4CXX_DEBUG(LOG.reportingLog, CStdString("added audiotape to queue:") + audioTapeRef->GetIdentifier()); + m_queueFullError = false; } else { - LOG4CXX_ERROR(LOG.reportingLog, CStdString("Reporting: queue full")); + if(m_queueFullError == false) + { + m_queueFullError = true; + LOG4CXX_ERROR(LOG.reportingLog, CStdString("queue full")); + } } } @@ -63,7 +73,7 @@ void Reporting::ThreadHandler(void *args) MessageRef msgRef; audioTapeRef->GetMessage(msgRef); - if(msgRef.get() && CONFIG.m_enableReporting) + if(msgRef.get() /*&& CONFIG.m_enableReporting*/) { CStdString msgAsSingleLineString = msgRef->SerializeSingleLine(); LOG4CXX_INFO(LOG.reportingLog, msgAsSingleLineString); diff --git a/orkaudio/Reporting.h b/orkaudio/Reporting.h index 0d09333..e2afb72 100644 --- a/orkaudio/Reporting.h +++ b/orkaudio/Reporting.h @@ -20,6 +20,7 @@ class Reporting { public: + Reporting(); static Reporting* GetInstance(); static void ThreadHandler(void *args); @@ -27,6 +28,7 @@ public: private: static Reporting m_reportingSingleton; ThreadSafeQueue<AudioTapeRef> m_audioTapeQueue; + bool m_queueFullError; }; #endif |