]> git.tdb.fi Git - builder.git/blob - source/logger.cpp
Only use source files that are actually files
[builder.git] / source / logger.cpp
1 #include <msp/io/print.h>
2 #include "logger.h"
3
4 using namespace std;
5 using namespace Msp;
6
7 void Logger::enable_channel(const string &chan)
8 {
9         enabled_channels.insert(chan);
10 }
11
12 void Logger::disable_channel(const string &chan)
13 {
14         enabled_channels.erase(chan);
15 }
16
17 void Logger::log(const string &chan, const string &message) const
18 {
19         if(enabled_channels.count(chan))
20                 IO::print("%s\n", message);
21 }