Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 20, 2011, 5:24:52 AM (14 years ago)
Author:
rgrieder
Message:

Sorted out log level handling on startup and transferred its control back to Core.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/unity_build/src/libraries/util/OutputHandler.cc

    r8517 r8518  
    157157        //! Only assigns the output stream with std::cout
    158158        ConsoleWriter()
    159             : OutputListener("consoleLog")
     159            : OutputListener("Console")
    160160        {
    161161            this->outputStream_ = &std::cout;
     
    215215        : outputLevel_(OutputLevel::Verbose)
    216216    {
     217        // Note: These levels only concern startup before orxonox.ini is read.
    217218#ifdef ORXONOX_RELEASE
    218         const OutputLevel::Value defaultLevelConsole = OutputLevel::Error;
    219         const OutputLevel::Value defaultLevelLogFile = OutputLevel::Info;
     219        const OutputLevel::Value initialLevelConsole = OutputLevel::Error;
    220220#else
    221         const OutputLevel::Value defaultLevelConsole = OutputLevel::Info;
    222         const OutputLevel::Value defaultLevelLogFile = OutputLevel::Debug;
     221        const OutputLevel::Value initialLevelConsole = OutputLevel::Info;
    223222#endif
     223        // Use high log level because we rewrite the log file anyway with the
     224        // correct level. But if Orxonox were to crash before that, we might be
     225        // grateful to have a high debug level, esp. for releases.
     226        const OutputLevel::Value intialLevelLogFile = OutputLevel::Debug;
    224227
    225228        this->logFile_ = new LogFileWriter();
    226229        // Use default level until we get the configValue from the Core
    227         this->logFile_->softDebugLevel_ = defaultLevelLogFile;
     230        this->logFile_->softDebugLevel_ = intialLevelLogFile;
    228231        this->registerOutputListener(this->logFile_);
    229232
    230233        this->consoleWriter_ = new ConsoleWriter();
    231         this->consoleWriter_->softDebugLevel_ = defaultLevelConsole;
     234        this->consoleWriter_->softDebugLevel_ = initialLevelConsole;
    232235        this->registerOutputListener(this->consoleWriter_);
    233236
Note: See TracChangeset for help on using the changeset viewer.