diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-15 15:48:41 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-15 15:48:41 +0000 |
| commit | d76e423884058d7eb7e397bc24b695d9e3c1a3f7 (patch) | |
| tree | 7552ad196edf24f2d3da99c4a7b080e6f2e6e754 /src/LogFactory.h | |
| parent | 2e8e926c1003a09663b1d16d7f4be8b45771cc9f (diff) | |
2008-05-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added --log-level option to specify log level. Log messages under
the specified level are not output. Default value is `debug'.
* src/HelpItemFactory.cc
* src/LogFactory.cc
* src/LogFactory.h
* src/Logger.h
* src/OptionHandlerFactory.cc
* src/SimpleLogger.cc
* src/SimpleLogger.h
* src/main.cc
* src/option_processing.cc
* src/prefs.h
* src/usage_text.h
Diffstat (limited to 'src/LogFactory.h')
| -rw-r--r-- | src/LogFactory.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/LogFactory.h b/src/LogFactory.h index 804f6958..7ebfb037 100644 --- a/src/LogFactory.h +++ b/src/LogFactory.h @@ -36,17 +36,17 @@ #define _D_LOG_FACTORY_H_ #include "common.h" +#include "Logger.h" #include <string> namespace aria2 { -class Logger; - class LogFactory { private: static std::string filename; static Logger* logger; static bool _consoleOutput; + static Logger::LEVEL _logLevel; public: /** * Get logger instance. Returned logger is singleton. @@ -69,6 +69,18 @@ public: _consoleOutput = f; } + + /** + * Set log level to output. + */ + static void setLogLevel(Logger::LEVEL level); + + /** + * Set log level to output by string represention of log level. + * Possible values are: debug, info, notice, warn, error + */ + static void setLogLevel(const std::string& level); + /** * Releases used resources */ |
