[icinga-checkins] icinga.org: icinga2/master: Made the debug log level slightly less spammy.

git at icinga.org git at icinga.org
Sat Feb 9 11:42:29 CET 2013


Module: icinga2
Branch: master
Commit: 3ab071fbcb6f6646d3d191298cab7ed2e09f697b
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=3ab071fbcb6f6646d3d191298cab7ed2e09f697b

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Sat Feb  9 10:55:54 2013 +0100

Made the debug log level slightly less spammy.

---

 components/checker/checkercomponent.cpp |    4 ----
 lib/base/timer.cpp                      |    8 +++++---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp
index c082808..3c731f3 100644
--- a/components/checker/checkercomponent.cpp
+++ b/components/checker/checkercomponent.cpp
@@ -53,8 +53,6 @@ void CheckerComponent::Stop(void)
 
 void CheckerComponent::CheckTimerHandler(void)
 {
-	Logger::Write(LogDebug, "checker", "CheckTimerHandler entered.");
-
 	double now = Utility::GetTime();
 	long tasks = 0;
 
@@ -116,8 +114,6 @@ void CheckerComponent::CheckTimerHandler(void)
 		tasks++;
 	}
 
-	Logger::Write(LogDebug, "checker", "CheckTimerHandler: past loop.");
-
 	if (missedServices > 0) {
 		stringstream msgbuf;
 		msgbuf << "Missed " << missedChecks << " checks for " << missedServices << " services";;
diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp
index 422b5f6..e023404 100644
--- a/lib/base/timer.cpp
+++ b/lib/base/timer.cpp
@@ -78,9 +78,11 @@ double Timer::ProcessTimers(void)
 
 	double et = Utility::GetTime();
 
-	stringstream msgbuf;
-	msgbuf << "Timers took " << et - st << " seconds";
-	Logger::Write(LogDebug, "base", msgbuf.str());
+	if (et - st > 0.01) {
+		stringstream msgbuf;
+		msgbuf << "Timers took " << et - st << " seconds";
+		Logger::Write(LogDebug, "base", msgbuf.str());
+	}
 
 	return wakeup;
 }





More information about the icinga-checkins mailing list