Tracore
Logger.h
1 //
2 // Created by wrede on 12.05.16.
3 //
4 
5 #ifndef GBMOT_LOGGER_H
6 #define GBMOT_LOGGER_H
7 #include <string>
8 
9 namespace util
10 {
16  class Logger
17  {
18  private:
22  Logger();
23 
27  bool info_;
28 
32  bool debug_;
33 
38  void LogMessage(std::string const & message);
39 
44  void LogErrorMessage(std::string const & message);
45  public:
49  Logger(Logger const &) = delete;
50 
54  void operator=(Logger const &) = delete;
55 
60  static Logger & Instance()
61  {
62  static Logger instance;
63  return instance;
64  }
65 
70  static void SetDebug(bool debug);
71 
76  static void SetInfo(bool info);
77 
82  static bool IsDebugEnabled();
83 
88  static bool IsInfoEnabled();
89 
94  static void LogInfo(std::string const & message);
95 
100  static void LogError(std::string const & message);
101 
106  static void LogDebug(std::string const & message);
107  };
108 }
109 
110 
111 #endif //GBMOT_LOGGER_H
Definition: FileIO.cpp:11
static Logger & Instance()
Definition: Logger.h:60
static bool IsDebugEnabled()
Definition: Logger.cpp:56
static void LogError(std::string const &message)
Definition: Logger.cpp:33
Definition: Logger.h:16
static bool IsInfoEnabled()
Definition: Logger.cpp:61
static void SetDebug(bool debug)
Definition: Logger.cpp:46
void operator=(Logger const &)=delete
static void SetInfo(bool info)
Definition: Logger.cpp:51
static void LogDebug(std::string const &message)
Definition: Logger.cpp:38
static void LogInfo(std::string const &message)
Definition: Logger.cpp:25