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/HttpSkipResponseCommand.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/HttpSkipResponseCommand.cc') diff --git a/src/HttpSkipResponseCommand.cc b/src/HttpSkipResponseCommand.cc index b38ea7d0..96ca1bbe 100644 --- a/src/HttpSkipResponseCommand.cc +++ b/src/HttpSkipResponseCommand.cc @@ -41,10 +41,12 @@ #include "Request.h" #include "DownloadEngine.h" #include "Logger.h" +#include "LogFactory.h" #include "HttpRequest.h" #include "Segment.h" #include "util.h" #include "StringFormat.h" +#include "fmt.h" #include "DlAbortEx.h" #include "HttpHeader.h" #include "prefs.h" @@ -68,14 +70,14 @@ HttpSkipResponseCommand::HttpSkipResponseCommand const SharedHandle& httpConnection, const SharedHandle& httpResponse, DownloadEngine* e, - const SharedHandle& s): - AbstractCommand(cuid, req, fileEntry, requestGroup, e, s), - httpConnection_(httpConnection), - httpResponse_(httpResponse), - streamFilter_(new NullSinkStreamFilter()), - sinkFilterOnly_(true), - totalLength_(httpResponse_->getEntityLength()), - receivedBytes_(0) + const SharedHandle& s) + : AbstractCommand(cuid, req, fileEntry, requestGroup, e, s), + httpConnection_(httpConnection), + httpResponse_(httpResponse), + streamFilter_(new NullSinkStreamFilter()), + sinkFilterOnly_(true), + totalLength_(httpResponse_->getEntityLength()), + receivedBytes_(0) {} HttpSkipResponseCommand::~HttpSkipResponseCommand() {} @@ -133,9 +135,7 @@ bool HttpSkipResponseCommand::executeInternal() throw DL_RETRY_EX(EX_GOT_EOF); } } catch(RecoverableException& e) { - if(getLogger()->debug()) { - getLogger()->debug(EX_EXCEPTION_CAUGHT, e); - } + A2_LOG_DEBUG_EX(EX_EXCEPTION_CAUGHT, e) return processResponse(); } -- cgit