|
1 | 1 | #ifndef LOGGER_MODULE_HPP_ |
2 | 2 | #define LOGGER_MODULE_HPP_ |
3 | | -#include <string> |
4 | | -#include <memory> |
5 | 3 | #include <functional> |
| 4 | +#include <memory> |
| 5 | +#include <string> |
6 | 6 |
|
7 | 7 | namespace cly { |
8 | | - enum class LogLevel { DEBUG = 1, INFO = 2, WARNING = 3, ERROR = 4, FATAL = 5 }; |
9 | | - using LoggerFunction = std::function<void(LogLevel, const std::string&)>; |
| 8 | +enum class LogLevel { DEBUG = 1, INFO = 2, WARNING = 3, ERROR = 4, FATAL = 5 }; |
| 9 | +using LoggerFunction = std::function<void(LogLevel, const std::string &)>; |
10 | 10 |
|
11 | | - class LoggerModule { |
12 | | - public: |
13 | | - LoggerModule(); |
14 | | - ~LoggerModule(); |
| 11 | +class LoggerModule { |
| 12 | +public: |
| 13 | + LoggerModule(); |
| 14 | + ~LoggerModule(); |
15 | 15 |
|
16 | | - /** |
17 | | - * Set custom logger function. |
18 | | - * |
19 | | - * @param logger pointer to function. |
20 | | - */ |
21 | | - void setLogger(LoggerFunction logger); |
| 16 | + /** |
| 17 | + * Set custom logger function. |
| 18 | + * |
| 19 | + * @param logger pointer to function. |
| 20 | + */ |
| 21 | + void setLogger(LoggerFunction logger); |
22 | 22 |
|
23 | | - /** |
24 | | - * Print important information. |
25 | | - * |
26 | | - * @param level importance and urgency of the message. |
27 | | - * @param message description of log. |
28 | | - */ |
29 | | - void log(LogLevel level, const std::string& message); |
| 23 | + /** |
| 24 | + * Print important information. |
| 25 | + * |
| 26 | + * @param level importance and urgency of the message. |
| 27 | + * @param message description of log. |
| 28 | + */ |
| 29 | + void log(LogLevel level, const std::string &message); |
30 | 30 |
|
31 | | - private: |
32 | | - class LoggerModuleImpl; |
33 | | - std::unique_ptr<LoggerModuleImpl> impl; |
34 | | - }; |
35 | | -} |
| 31 | +private: |
| 32 | + class LoggerModuleImpl; |
| 33 | + std::unique_ptr<LoggerModuleImpl> impl; |
| 34 | +}; |
| 35 | +} // namespace cly |
36 | 36 | #endif |
37 | | - |
0 commit comments