X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flogger.h;fp=source%2Flogger.h;h=0000000000000000000000000000000000000000;hb=c8e829c219c65ff8e93b6c7b66212ff0876441c5;hp=3a10f0e89177e10c071b97cd389c79e4d46a1404;hpb=e2c9c3fffcc61a0c102ccf6a7924e2de709092ad;p=builder.git diff --git a/source/logger.h b/source/logger.h deleted file mode 100644 index 3a10f0e..0000000 --- a/source/logger.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef LOGGER_H_ -#define LOGGER_H_ - -#include -#include -#include - -class Logger -{ -private: - std::vector enabled_channels; - -public: - void enable_channel(const std::string &); - void disable_channel(const std::string &); - bool is_channel_enabled(const std::string &) const; - - void log(const std::string &, const std::string &) const; - - template - void log(const std::string &, const std::string &, Args &&...) const; - -private: - void print(const std::string &) const; -}; - -template -void Logger::log(const std::string &chan, const std::string &fmt, Args &&... args) const -{ - if(is_channel_enabled(chan)) - print(Msp::format(fmt, std::forward(args)...)); -} - -#endif