Changeset 699 for code/branches/FICN/src/orxonox/core/DebugLevel.cc
- Timestamp:
- Dec 27, 2007, 4:58:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/DebugLevel.cc
r696 r699 32 32 33 33 #include "CoreIncludes.h" 34 #include "Debug.h"35 34 #include "DebugLevel.h" 36 35 … … 53 52 void DebugLevel::setConfigValues() 54 53 { 55 SetConfigValue(softDebugLevel_, 2); 54 SetConfigValue(softDebugLevelConsole_, 3); 55 SetConfigValue(softDebugLevelLogfile_, 3); 56 SetConfigValue(softDebugLevelShell_, 1); 57 58 // softDebugLevel_ is the maximum of the 3 variables 59 this->softDebugLevel_ = this->softDebugLevelConsole_; 60 if (this->softDebugLevelLogfile_ > this->softDebugLevel_) 61 this->softDebugLevel_ = this->softDebugLevelLogfile_; 62 if (this->softDebugLevelShell_ > this->softDebugLevel_) 63 this->softDebugLevel_ = this->softDebugLevelShell_; 56 64 } 57 65 … … 59 67 @brief Static function that holds the singleton. 60 68 */ 61 int DebugLevel::getSoftDebugLevel( )69 int DebugLevel::getSoftDebugLevel(OutputHandler::OutputDevice device) 62 70 { 63 71 static bool bCreatingSoftDebugLevelObject = true; // Static variable - used to enhance the performance … … 67 75 // If bReturnSoftDebugLevel is true, the instance of DebugLevel was created (it's set to true at the end of the constructor, call by reference) 68 76 if (bReturnSoftDebugLevel) 69 return theOnlyDebugLevelObject->softDebugLevel_; 77 { 78 if (device == OutputHandler::LD_All) 79 return theOnlyDebugLevelObject->softDebugLevel_; 80 else if (device == OutputHandler::LD_Console) 81 return theOnlyDebugLevelObject->softDebugLevelConsole_; 82 else if (device == OutputHandler::LD_Logfile) 83 return theOnlyDebugLevelObject->softDebugLevelLogfile_; 84 else if (device == OutputHandler::LD_Shell) 85 return theOnlyDebugLevelObject->softDebugLevelShell_; 86 } 70 87 71 88 // If bCreatingSoftDebugLevelObject is true, we're just about to create an instance of the DebugLevel class … … 74 91 bCreatingSoftDebugLevelObject = false; 75 92 theOnlyDebugLevelObject = new DebugLevel(bReturnSoftDebugLevel); 76 return theOnlyDebugLevelObject->softDebugLevel_;93 return getSoftDebugLevel(device); 77 94 } 78 95
Note: See TracChangeset
for help on using the changeset viewer.