COMMON: Allow for enabling/disabling debug channels by number
This commit is contained in:
parent
3165d52a7b
commit
d51d3d4086
2 changed files with 28 additions and 2 deletions
|
@ -80,7 +80,7 @@ public:
|
|||
void clearAllDebugChannels();
|
||||
|
||||
/**
|
||||
* Enables an debug channel.
|
||||
* Enables a debug channel.
|
||||
*
|
||||
* @param name the name of the debug channel to enable
|
||||
* @return true on success, false on failure
|
||||
|
@ -88,13 +88,29 @@ public:
|
|||
bool enableDebugChannel(const String &name);
|
||||
|
||||
/**
|
||||
* Disables an debug channel.
|
||||
* Enables a debug channel.
|
||||
*
|
||||
* @param channel The debug channel
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
bool enableDebugChannel(uint32 channel);
|
||||
|
||||
/**
|
||||
* Disables a debug channel.
|
||||
*
|
||||
* @param name the name of the debug channel to disable
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
bool disableDebugChannel(const String &name);
|
||||
|
||||
/**
|
||||
* Disables a debug channel.
|
||||
*
|
||||
* @param channel The debug channel
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
bool disableDebugChannel(uint32 channel);
|
||||
|
||||
typedef List<DebugChannel> DebugChannelList;
|
||||
|
||||
/**
|
||||
|
|
|
@ -78,6 +78,11 @@ bool DebugManager::enableDebugChannel(const String &name) {
|
|||
}
|
||||
}
|
||||
|
||||
bool DebugManager::enableDebugChannel(uint32 channel) {
|
||||
gDebugChannelsEnabled |= channel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DebugManager::disableDebugChannel(const String &name) {
|
||||
DebugChannelMap::iterator i = gDebugChannels.find(name);
|
||||
|
||||
|
@ -91,6 +96,11 @@ bool DebugManager::disableDebugChannel(const String &name) {
|
|||
}
|
||||
}
|
||||
|
||||
bool DebugManager::disableDebugChannel(uint32 channel) {
|
||||
gDebugChannelsEnabled &= ~channel;
|
||||
return true;
|
||||
}
|
||||
|
||||
DebugManager::DebugChannelList DebugManager::listDebugChannels() {
|
||||
DebugChannelList tmp;
|
||||
for (DebugChannelMap::iterator i = gDebugChannels.begin(); i != gDebugChannels.end(); ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue