diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/debug-channels.h | 11 | ||||
-rw-r--r-- | common/debug.cpp | 11 |
2 files changed, 19 insertions, 3 deletions
diff --git a/common/debug-channels.h b/common/debug-channels.h index 83f416a3b8..1414a1053a 100644 --- a/common/debug-channels.h +++ b/common/debug-channels.h @@ -95,8 +95,6 @@ public: */ bool disableDebugChannel(const String &name); - - typedef List<DebugChannel> DebugChannelList; /** @@ -106,6 +104,15 @@ public: */ DebugChannelList listDebugChannels(); + /** + * Enable all debug channels. + */ + void enableAllDebugChannels(); + + /** + * Disable all debug channels. + */ + void disableAllDebugChannels(); /** * Test whether the given debug channel is enabled. diff --git a/common/debug.cpp b/common/debug.cpp index 58cc0287a8..b8c345e4f0 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -85,7 +85,6 @@ bool DebugManager::disableDebugChannel(const String &name) { } } - DebugManager::DebugChannelList DebugManager::listDebugChannels() { DebugChannelList tmp; for (DebugChannelMap::iterator i = gDebugChannels.begin(); i != gDebugChannels.end(); ++i) @@ -95,6 +94,16 @@ DebugManager::DebugChannelList DebugManager::listDebugChannels() { return tmp; } +void DebugManager::enableAllDebugChannels() { + for (DebugChannelMap::iterator i = gDebugChannels.begin(); i != gDebugChannels.end(); ++i) + enableDebugChannel(i->_value.name); +} + +void DebugManager::disableAllDebugChannels() { + for (DebugChannelMap::iterator i = gDebugChannels.begin(); i != gDebugChannels.end(); ++i) + disableDebugChannel(i->_value.name); +} + bool DebugManager::isDebugChannelEnabled(uint32 channel) { // Debug level 11 turns on all special debug level messages if (gDebugLevel == 11) |