mirror of https://github.com/aria2/aria2
2010-01-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed Logger from OptionParser. When OptionParser is used to parse options at bootstrap, LogFactory is not configured yet properly. When LogFactory is used in OptionParser, it initializes itself to return a logger which has no ability to write log to the disk. * src/OptionParser.cc * src/OptionParser.hpull/1/head
parent
ea86dbb245
commit
84389aefe2
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2010-01-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Removed Logger from OptionParser. When OptionParser is used to
|
||||
parse options at bootstrap, LogFactory is not configured yet
|
||||
properly. When LogFactory is used in OptionParser, it initializes
|
||||
itself to return a logger which has no ability to write log to the
|
||||
disk.
|
||||
* src/OptionParser.cc
|
||||
* src/OptionParser.h
|
||||
|
||||
2010-01-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Added following sentance to the help message of --out option:
|
||||
|
|
|
@ -48,14 +48,11 @@
|
|||
#include "a2functional.h"
|
||||
#include "array_fun.h"
|
||||
#include "OptionHandlerFactory.h"
|
||||
#include "Logger.h"
|
||||
#include "LogFactory.h"
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
OptionParser::OptionParser():
|
||||
_idCounter(0),
|
||||
_logger(LogFactory::getInstance())
|
||||
_idCounter(0)
|
||||
{}
|
||||
|
||||
template<typename InputIterator>
|
||||
|
@ -203,7 +200,6 @@ OptionHandlerHandle OptionParser::getOptionHandlerByName
|
|||
handler = *i;
|
||||
} else {
|
||||
handler.reset(new NullOptionHandler());
|
||||
_logger->warn("Skipped unknown option --%s.", optName.c_str());
|
||||
}
|
||||
return handler;
|
||||
}
|
||||
|
|
|
@ -48,14 +48,11 @@ namespace aria2 {
|
|||
|
||||
class Option;
|
||||
class OptionHandler;
|
||||
class Logger;
|
||||
|
||||
class OptionParser {
|
||||
private:
|
||||
int _idCounter;
|
||||
|
||||
Logger* _logger;
|
||||
|
||||
// _optionHandlers is sorted by OptionHandler::getName() in
|
||||
// ascending order.
|
||||
std::vector<SharedHandle<OptionHandler> > _optionHandlers;
|
||||
|
|
Loading…
Reference in New Issue