Only log check timer when we actually created any tasks.

This commit is contained in:
Gunnar Beutner 2012-10-15 08:52:31 +02:00
parent e426548863
commit ac11c84813
1 changed files with 5 additions and 3 deletions

View File

@ -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)