From 580098eb4929a3bdbf424af18da361259ef2efe5 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 20 Nov 2010 08:21:36 +0000 Subject: 2010-11-20 Tatsuhiro Tsujikawa Rewritten Logger interface. Logger now writes source file name and line number in log file. --- src/TimedHaltCommand.cc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/TimedHaltCommand.cc') diff --git a/src/TimedHaltCommand.cc b/src/TimedHaltCommand.cc index ab36a110..1962b812 100644 --- a/src/TimedHaltCommand.cc +++ b/src/TimedHaltCommand.cc @@ -36,15 +36,19 @@ #include "DownloadEngine.h" #include "RequestGroupMan.h" #include "Logger.h" +#include "LogFactory.h" #include "message.h" +#include "fmt.h" namespace aria2 { -TimedHaltCommand::TimedHaltCommand(cuid_t cuid, DownloadEngine* e, - time_t secondsToHalt, - bool forceHalt): - TimeBasedCommand(cuid, e, secondsToHalt, true), - forceHalt_(forceHalt) {} +TimedHaltCommand::TimedHaltCommand +(cuid_t cuid, DownloadEngine* e, + time_t secondsToHalt, + bool forceHalt) + : TimeBasedCommand(cuid, e, secondsToHalt, true), + forceHalt_(forceHalt) +{} TimedHaltCommand::~TimedHaltCommand() {} @@ -59,10 +63,10 @@ void TimedHaltCommand::preProcess() void TimedHaltCommand::process() { if(!getDownloadEngine()->isHaltRequested()) { - getLogger()->notice(MSG_TIME_HAS_PASSED, - static_cast(getInterval())); + A2_LOG_NOTICE(fmt(MSG_TIME_HAS_PASSED, + static_cast(getInterval()))); if(forceHalt_) { - getLogger()->notice("This is emergency shutdown."); + A2_LOG_NOTICE("This is emergency shutdown."); getDownloadEngine()->requestForceHalt(); } else { getDownloadEngine()->requestHalt(); -- cgit