hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
dummy_logger.hpp
Go to the documentation of this file.
1 
6 #ifndef LOGGER_DUMMY_LOGGER_HPP
7 #define LOGGER_DUMMY_LOGGER_HPP
8 
9 #include "logger/logger.hpp"
10 
11 namespace logger {
12 
13  class DummyLogger : public Logger {
14  protected:
15  void logInternal(Level level, const std::string &s) const override {}
16 
17  bool shouldLog(Level level) const override {
18  return false;
19  }
20  };
21 
23  static std::shared_ptr<DummyLogger> log = std::make_shared<DummyLogger>();
24  return log;
25  }
26 
27 } // namespace logger
28 
29 #endif // LOGGER_DUMMY_LOGGER_HPP
void log(Level level, const std::string &format, const Args &...args) const
Definition: logger.hpp:84
LoggerPtr getDummyLoggerPtr()
Definition: dummy_logger.hpp:22
void logInternal(Level level, const std::string &s) const override
Definition: dummy_logger.hpp:15
std::shared_ptr< Logger > LoggerPtr
Definition: logger_fwd.hpp:22
Definition: dummy_logger.hpp:11
Definition: logger.hpp:45
Definition: dummy_logger.hpp:13
bool shouldLog(Level level) const override
Definition: dummy_logger.hpp:17
LogLevel
Log levels.
Definition: logger.hpp:36