danicoin/src/Logging/CommonLogger.h
2016-01-18 15:33:29 +00:00

32 lines
849 B
C++
Executable file

// 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 <set>
#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<std::string> disabledCategories;
Level logLevel;
std::string pattern;
CommonLogger(Level level);
virtual void doLogString(const std::string& message);
};
}