// Copyright (c) 2011-2016 The Cryptonote developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once #include #include "ILogger.h" namespace Logging { class CommonLogger : public ILogger { public: virtual void operator()(const std::string& category, Level level, boost::posix_time::ptime time, const std::string& body) override; virtual void enableCategory(const std::string& category); virtual void disableCategory(const std::string& category); virtual void setMaxLevel(Level level); void setPattern(const std::string& pattern); protected: std::set disabledCategories; Level logLevel; std::string pattern; CommonLogger(Level level); virtual void doLogString(const std::string& message); }; }