COMMON: Allow for enabling/disabling debug channels by number

This commit is contained in:
Paul Gilbert 2019-11-02 19:33:00 -07:00
parent 3165d52a7b
commit d51d3d4086
2 changed files with 28 additions and 2 deletions

View file

@ -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)