Fixed the bug that log file is not created if there is warning before log open

Use LogFactory::reconfigure() to reopen log file after setting log
filename from option.
pull/8/head
Tatsuhiro Tsujikawa 2011-12-27 17:14:29 +09:00
parent 11ee82df2e
commit e6c44871c8
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ error_code::Value main(int argc, char* argv[])
if(op->getAsBool(PREF_QUIET)) { if(op->getAsBool(PREF_QUIET)) {
LogFactory::setConsoleOutput(false); LogFactory::setConsoleOutput(false);
} }
LogFactory::reconfigure();
error_code::Value exitStatus = error_code::FINISHED; error_code::Value exitStatus = error_code::FINISHED;
A2_LOG_INFO("<<--- --- --- ---"); A2_LOG_INFO("<<--- --- --- ---");
A2_LOG_INFO(" --- --- --- ---"); A2_LOG_INFO(" --- --- --- ---");