summaryrefslogtreecommitdiff
path: root/src/BtStopDownloadCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-20 08:21:36 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-11-20 08:21:36 +0000
commit580098eb4929a3bdbf424af18da361259ef2efe5 (patch)
treec6ff77fa55fcbdcdd0ca21ec2105db14a8c050d3 /src/BtStopDownloadCommand.cc
parent3940da75624b194cdd5036f9fe330fcecc725964 (diff)
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten Logger interface. Logger now writes source file name and line number in log file.
Diffstat (limited to 'src/BtStopDownloadCommand.cc')
-rw-r--r--src/BtStopDownloadCommand.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/BtStopDownloadCommand.cc b/src/BtStopDownloadCommand.cc
index aaa47627..59225080 100644
--- a/src/BtStopDownloadCommand.cc
+++ b/src/BtStopDownloadCommand.cc
@@ -37,8 +37,10 @@
#include "RequestGroup.h"
#include "BtRuntime.h"
#include "Logger.h"
+#include "LogFactory.h"
#include "wallclock.h"
#include "util.h"
+#include "fmt.h"
namespace aria2 {
@@ -46,10 +48,10 @@ BtStopDownloadCommand::BtStopDownloadCommand
(cuid_t cuid,
RequestGroup* requestGroup,
DownloadEngine* e,
- time_t timeout):
- TimeBasedCommand(cuid, e, 1),
- requestGroup_(requestGroup),
- timeout_(timeout)
+ time_t timeout)
+ : TimeBasedCommand(cuid, e, 1),
+ requestGroup_(requestGroup),
+ timeout_(timeout)
{}
void BtStopDownloadCommand::preProcess()
@@ -58,9 +60,9 @@ void BtStopDownloadCommand::preProcess()
enableExit();
}
if(checkPoint_.difference(global::wallclock) >= timeout_) {
- getLogger()->notice("GID#%s Stop downloading torrent due to"
- " --bt-stop-timeout option.",
- util::itos(requestGroup_->getGID()).c_str());
+ A2_LOG_NOTICE(fmt("GID#%s Stop downloading torrent due to"
+ " --bt-stop-timeout option.",
+ util::itos(requestGroup_->getGID()).c_str()));
requestGroup_->setForceHaltRequested(true);
enableExit();
}