Changeset 8518 for code/branches/unity_build/src/libraries/util
- Timestamp:
- May 20, 2011, 5:24:52 AM (14 years ago)
- Location:
- code/branches/unity_build/src/libraries/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/unity_build/src/libraries/util/Debug.h
r7401 r8518 83 83 #ifdef ORXONOX_RELEASE 84 84 const int hardDebugLevel = OutputLevel::Verbose; 85 #elif defined(NDEBUG)86 const int hardDebugLevel = OutputLevel::Verbose;87 85 #else 88 86 //! Maximum level for debug output that should be even processed at run time -
code/branches/unity_build/src/libraries/util/OutputHandler.cc
r8517 r8518 157 157 //! Only assigns the output stream with std::cout 158 158 ConsoleWriter() 159 : OutputListener(" consoleLog")159 : OutputListener("Console") 160 160 { 161 161 this->outputStream_ = &std::cout; … … 215 215 : outputLevel_(OutputLevel::Verbose) 216 216 { 217 // Note: These levels only concern startup before orxonox.ini is read. 217 218 #ifdef ORXONOX_RELEASE 218 const OutputLevel::Value defaultLevelConsole = OutputLevel::Error; 219 const OutputLevel::Value defaultLevelLogFile = OutputLevel::Info; 219 const OutputLevel::Value initialLevelConsole = OutputLevel::Error; 220 220 #else 221 const OutputLevel::Value defaultLevelConsole = OutputLevel::Info; 222 const OutputLevel::Value defaultLevelLogFile = OutputLevel::Debug; 221 const OutputLevel::Value initialLevelConsole = OutputLevel::Info; 223 222 #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; 224 227 225 228 this->logFile_ = new LogFileWriter(); 226 229 // Use default level until we get the configValue from the Core 227 this->logFile_->softDebugLevel_ = defaultLevelLogFile;230 this->logFile_->softDebugLevel_ = intialLevelLogFile; 228 231 this->registerOutputListener(this->logFile_); 229 232 230 233 this->consoleWriter_ = new ConsoleWriter(); 231 this->consoleWriter_->softDebugLevel_ = defaultLevelConsole;234 this->consoleWriter_->softDebugLevel_ = initialLevelConsole; 232 235 this->registerOutputListener(this->consoleWriter_); 233 236 -
code/branches/unity_build/src/libraries/util/OutputHandler.h
r8517 r8518 257 257 //! Returns the soft debug level of the listener 258 258 int getSoftDebugLevel() const { return this->softDebugLevel_; } 259 //! Sets the soft debug level of the listener260 void setSoftDebugLevel(int level)261 {262 this->softDebugLevel_ = level;263 OutputHandler::getInstance().setSoftDebugLevel(this->name_, level);264 }265 259 266 260 protected:
Note: See TracChangeset
for help on using the changeset viewer.