summaryrefslogtreecommitdiff
path: root/src/FtpFinishDownloadCommand.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/FtpFinishDownloadCommand.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/FtpFinishDownloadCommand.cc')
-rw-r--r--src/FtpFinishDownloadCommand.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/FtpFinishDownloadCommand.cc b/src/FtpFinishDownloadCommand.cc
index 64555cd7..d151b204 100644
--- a/src/FtpFinishDownloadCommand.cc
+++ b/src/FtpFinishDownloadCommand.cc
@@ -43,10 +43,12 @@
#include "FtpConnection.h"
#include "message.h"
#include "StringFormat.h"
+#include "fmt.h"
#include "DlAbortEx.h"
#include "SocketCore.h"
#include "RequestGroup.h"
#include "Logger.h"
+#include "LogFactory.h"
#include "util.h"
#include "wallclock.h"
@@ -90,20 +92,21 @@ bool FtpFinishDownloadCommand::execute()
getSocket(), options);
}
} else {
- getLogger()->info("CUID#%s - Bad status for transfer complete.",
- util::itos(getCuid()).c_str());
+ A2_LOG_INFO(fmt("CUID#%s - Bad status for transfer complete.",
+ util::itos(getCuid()).c_str()));
}
} else if(getCheckPoint().difference(global::wallclock) >= getTimeout()) {
- getLogger()->info("CUID#%s - Timeout before receiving transfer complete.",
- util::itos(getCuid()).c_str());
+ A2_LOG_INFO(fmt("CUID#%s - Timeout before receiving transfer complete.",
+ util::itos(getCuid()).c_str()));
} else {
getDownloadEngine()->addCommand(this);
return false;
}
} catch(RecoverableException& e) {
- getLogger()->info("CUID#%s - Exception was thrown, but download was"
- " finished, so we can ignore the exception.",
- e, util::itos(getCuid()).c_str());
+ A2_LOG_INFO_EX(fmt("CUID#%s - Exception was thrown, but download was"
+ " finished, so we can ignore the exception.",
+ util::itos(getCuid()).c_str()),
+ e);
}
if(getRequestGroup()->downloadFinished()) {
return true;