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>
|
2010-01-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Added following sentance to the help message of --out option:
|
Added following sentance to the help message of --out option:
|
||||||
|
|
|
@ -48,14 +48,11 @@
|
||||||
#include "a2functional.h"
|
#include "a2functional.h"
|
||||||
#include "array_fun.h"
|
#include "array_fun.h"
|
||||||
#include "OptionHandlerFactory.h"
|
#include "OptionHandlerFactory.h"
|
||||||
#include "Logger.h"
|
|
||||||
#include "LogFactory.h"
|
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
OptionParser::OptionParser():
|
OptionParser::OptionParser():
|
||||||
_idCounter(0),
|
_idCounter(0)
|
||||||
_logger(LogFactory::getInstance())
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template<typename InputIterator>
|
template<typename InputIterator>
|
||||||
|
@ -203,7 +200,6 @@ OptionHandlerHandle OptionParser::getOptionHandlerByName
|
||||||
handler = *i;
|
handler = *i;
|
||||||
} else {
|
} else {
|
||||||
handler.reset(new NullOptionHandler());
|
handler.reset(new NullOptionHandler());
|
||||||
_logger->warn("Skipped unknown option --%s.", optName.c_str());
|
|
||||||
}
|
}
|
||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,11 @@ namespace aria2 {
|
||||||
|
|
||||||
class Option;
|
class Option;
|
||||||
class OptionHandler;
|
class OptionHandler;
|
||||||
class Logger;
|
|
||||||
|
|
||||||
class OptionParser {
|
class OptionParser {
|
||||||
private:
|
private:
|
||||||
int _idCounter;
|
int _idCounter;
|
||||||
|
|
||||||
Logger* _logger;
|
|
||||||
|
|
||||||
// _optionHandlers is sorted by OptionHandler::getName() in
|
// _optionHandlers is sorted by OptionHandler::getName() in
|
||||||
// ascending order.
|
// ascending order.
|
||||||
std::vector<SharedHandle<OptionHandler> > _optionHandlers;
|
std::vector<SharedHandle<OptionHandler> > _optionHandlers;
|
||||||
|
|
Loading…
Reference in New Issue