From ac11c848133ddd566f5436d446c855a0a7ca4842 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 15 Oct 2012 08:52:31 +0200 Subject: [PATCH] Only log check timer when we actually created any tasks. --- components/checker/checkercomponent.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index 43e27239c..e3fea4f08 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -108,9 +108,11 @@ void CheckerComponent::CheckTimerHandler(void) Logger::Write(LogWarning, "checker", msgbuf.str()); } - stringstream msgbuf; - msgbuf << "CheckTimerHandler: created " << tasks << " tasks"; - Logger::Write(LogInformation, "checker", msgbuf.str()); + if (tasks > 0) { + stringstream msgbuf; + msgbuf << "CheckTimerHandler: created " << tasks << " tasks"; + Logger::Write(LogInformation, "checker", msgbuf.str()); + } } void CheckerComponent::CheckCompletedHandler(const Service::Ptr& service, const ScriptTask::Ptr& task) -- 2.40.0