@@ -54,13 +54,13 @@ static constexpr auto PastLastSlash(cstr a) -> cstr { return PastLastSlash(a, a)
54
54
})
55
55
56
56
// Log levels.
57
- static constexpr int LOG_LEVEL_OFF = 1000 ;
58
- static constexpr int LOG_LEVEL_ERROR = 500 ;
59
- static constexpr int LOG_LEVEL_WARN = 400 ;
60
- static constexpr int LOG_LEVEL_INFO = 300 ;
61
- static constexpr int LOG_LEVEL_DEBUG = 200 ;
62
- static constexpr int LOG_LEVEL_TRACE = 100 ;
63
- static constexpr int LOG_LEVEL_ALL = 0 ;
57
+ # define LOG_LEVEL_OFF 1000
58
+ # define LOG_LEVEL_ERROR 500
59
+ # define LOG_LEVEL_WARN 400
60
+ # define LOG_LEVEL_INFO 300
61
+ # define LOG_LEVEL_DEBUG 200
62
+ # define LOG_LEVEL_TRACE 100
63
+ # define LOG_LEVEL_ALL 0
64
64
65
65
#define LOG_LOG_TIME_FORMAT " %Y-%m-%d %H:%M:%S"
66
66
#define LOG_OUTPUT_STREAM stdout
@@ -71,11 +71,11 @@ static constexpr int LOG_LEVEL_ALL = 0;
71
71
// #pragma message("Warning: LOG_LEVEL compile option was not explicitly
72
72
// given.")
73
73
#ifndef NDEBUG
74
+ #define LOG_LEVEL LOG_LEVEL_DEBUG
74
75
// #pragma message("LOG_LEVEL_DEBUG is used instead as DEBUG option is on.")
75
- static constexpr int LOG_LEVEL = LOG_LEVEL_DEBUG;
76
76
#else
77
77
// #pragma message("LOG_LEVEL_WARN is used instead as DEBUG option is off.")
78
- static constexpr int LOG_LEVEL = LOG_LEVEL_INFO;
78
+ # define LOG_LEVEL LOG_LEVEL_INFO
79
79
#endif
80
80
// #pragma message("Give LOG_LEVEL compile option to overwrite the default
81
81
// level.")
0 commit comments