| 1 | #ifndef LOGGER_HPP_ |
| 2 | #define LOGGER_HPP_ |
| 3 |
|
| 4 | #include <ostream> |
| 5 | #include <string> |
| 6 |
|
| 7 | class Logger |
| 8 | { |
| 9 | public: |
| 10 | Logger(std::string logger_name); |
| 11 | ~Logger() = default; |
| 12 |
|
| 13 | enum Verbosity |
| 14 | { |
| 15 | DISABLED, |
| 16 | ERROR, |
| 17 | WARNING, |
| 18 | INFO, |
| 19 | DEBUG, |
| 20 | VERBOSE, |
| 21 | TRACE, |
| 22 | }; |
| 23 |
|
| 24 | static void InitializeLogging(Verbosity max_verbosity, std::ostream *ostream); |
| 25 |
|
| 26 | void Log(Verbosity verbosity, std::string message); |
| 27 |
|
| 28 | protected: |
| 29 | static std::ostream *s_ostream; |
| 30 | static Verbosity s_maxVerbosity; |
| 31 |
|
| 32 | std::string m_loggerName; |
| 33 | }; |
| 34 |
|
| 35 | #endif /* LOGGER_HPP_ */ |
| 36 |
|