Changeset 8799 for code/branches/output/src/libraries/core/Core.cc
- Timestamp:
- Jul 30, 2011, 7:51:08 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/core/Core.cc
r8796 r8799 50 50 # undef max 51 51 #endif 52 53 #include <boost/preprocessor/stringize.hpp>54 52 55 53 #include "util/Clock.h" … … 231 229 } 232 230 233 namespace DefaultLevelLogFile234 {235 #pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: inspect this (and remove boost include)")236 const OutputLevel Dev = level::internal_info;237 const OutputLevel User = level::internal_info;238 }239 240 231 //! Function to collect the SetConfigValue-macro calls. 241 232 void Core::setConfigValues() 242 233 { 243 // Choose the default level according to the path Orxonox was started (build directory or not) 244 OutputLevel defaultLogLevel = (PathConfig::buildDirectoryRun() ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User); 245 246 SetConfigValueExternal(debugLevelLogFile_, "OutputHandler", "debugLevelLogFile", defaultLogLevel) 247 .description("The maximum level of debug output written to the log file"); 248 LogWriter::getInstance().setLevelMax(this->debugLevelLogFile_); 234 SetConfigValueExternal(LogWriter::getInstance().configurableMaxLevel_, 235 LogWriter::getInstance().getConfigurableSectionName(), 236 LogWriter::getInstance().getConfigurableMaxLevelName(), 237 LogWriter::getInstance().configurableMaxLevel_) 238 .description("The maximum level of output shown in the log file") 239 .callback(static_cast<BaseWriter*>(&LogWriter::getInstance()), &BaseWriter::changedConfigurableLevels); 240 SetConfigValueExternal(LogWriter::getInstance().configurableContextsMaxLevel_, 241 LogWriter::getInstance().getConfigurableSectionName(), 242 LogWriter::getInstance().getConfigurableContextsMaxLevelName(), 243 LogWriter::getInstance().configurableContextsMaxLevel_) 244 .description("The maximum level of output shown in the log file for additional contexts") 245 .callback(static_cast<BaseWriter*>(&LogWriter::getInstance()), &BaseWriter::changedConfigurableLevels); 246 SetConfigValueExternal(LogWriter::getInstance().configurableContexts_, 247 LogWriter::getInstance().getConfigurableSectionName(), 248 LogWriter::getInstance().getConfigurableContextsName(), 249 LogWriter::getInstance().configurableContexts_) 250 .description("Additional output contexts shown in the log file") 251 .callback(static_cast<BaseWriter*>(&LogWriter::getInstance()), &BaseWriter::changedConfigurableContexts); 249 252 250 253 SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun()) … … 281 284 void Core::devModeChanged() 282 285 { 283 bool isNormal = (bDevMode_ == PathConfig::buildDirectoryRun());284 if (isNormal)285 {286 ModifyConfigValueExternal(debugLevelLogFile_, "debugLevelLogFile", update);287 }288 else289 {290 OutputLevel level = (bDevMode_ ? DefaultLevelLogFile::Dev : DefaultLevelLogFile::User);291 ModifyConfigValueExternal(debugLevelLogFile_, "debugLevelLogFile", tset, level);292 }293 294 286 // Inform listeners 295 287 ObjectList<DevModeListener>::iterator it = ObjectList<DevModeListener>::begin();
Note: See TracChangeset
for help on using the changeset viewer.