summaryrefslogtreecommitdiff
path: root/src/SingleFileAllocationIterator.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/SingleFileAllocationIterator.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/SingleFileAllocationIterator.cc')
-rw-r--r--src/SingleFileAllocationIterator.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/SingleFileAllocationIterator.cc b/src/SingleFileAllocationIterator.cc
index 96d91f76..420ff699 100644
--- a/src/SingleFileAllocationIterator.cc
+++ b/src/SingleFileAllocationIterator.cc
@@ -49,12 +49,13 @@ namespace aria2 {
#define ALIGNMENT 512
SingleFileAllocationIterator::SingleFileAllocationIterator
-(BinaryStream* stream, off_t offset, uint64_t totalLength):
- stream_(stream),
- offset_(offset),
- totalLength_(totalLength),
- buffer_(0),
- logger_(LogFactory::getInstance())
+(BinaryStream* stream,
+ off_t offset,
+ uint64_t totalLength)
+ : stream_(stream),
+ offset_(offset),
+ totalLength_(totalLength),
+ buffer_(0)
{
if(offset_%ALIGNMENT != 0) {
stream_->disableDirectIO();
@@ -75,9 +76,9 @@ void SingleFileAllocationIterator::init()
static bool noticeDone = false;
if(!noticeDone) {
noticeDone = true;
- logger_->notice("Allocating disk space. Use --file-allocation=none to"
- " disable it. See --file-allocation option in man page for"
- " more details.");
+ A2_LOG_NOTICE("Allocating disk space. Use --file-allocation=none to"
+ " disable it. See --file-allocation option in man page for"
+ " more details.");
}
#ifdef HAVE_POSIX_MEMALIGN
buffer_ = reinterpret_cast<unsigned char*>