Pārlūkot izejas kodu

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.
Tatsuhiro Tsujikawa 14 gadi atpakaļ
vecāks
revīzija
e6c44871c8
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      src/main.cc

+ 1 - 0
src/main.cc

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