diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:54:28 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:54:28 +0200 |
commit | 9b7be419c9dcc6ebd1e504713c7b2676ca3d2fdf (patch) | |
tree | 97a2fc5ce1ec1345bd6f44889682ea9a2ffafd76 /src/crepe/util/log.cpp | |
parent | 080ad535e6fc6666b919b1a21b6986aaf9b678eb (diff) |
`clang-format`
Diffstat (limited to 'src/crepe/util/log.cpp')
-rw-r--r-- | src/crepe/util/log.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/crepe/util/log.cpp b/src/crepe/util/log.cpp index 0c2ce1e..b869aad 100644 --- a/src/crepe/util/log.cpp +++ b/src/crepe/util/log.cpp @@ -9,13 +9,13 @@ using namespace crepe::util; static const char * const LOG_PREFIX[] = { - [log_level::DEBUG] = "[DBG] ", - [log_level::INFO] = "[INFO] ", - [log_level::WARNING] = "[WARN] ", - [log_level::ERROR] = "[ERR] ", + [LogLevel::DEBUG] = "[DBG] ", + [LogLevel::INFO] = "[INFO] ", + [LogLevel::WARNING] = "[WARN] ", + [LogLevel::ERROR] = "[ERR] ", }; -static void log(enum log_level level, const std::string & msg) { +static void log(LogLevel level, const std::string & msg) { using namespace std; string out = string(LOG_PREFIX[level]) + msg; if (!out.ends_with("\n")) out += "\n"; @@ -28,11 +28,11 @@ static void log(enum log_level level, const std::string & msg) { void crepe::util::logf(const char * fmt, ...) { va_list args; va_start(args, fmt); - log(log_level::DEBUG, va_stringf(args, fmt)); + log(LogLevel::DEBUG, va_stringf(args, fmt)); va_end(args); } -void crepe::util::logf(log_level level, const char * fmt, ...) { +void crepe::util::logf(LogLevel level, const char * fmt, ...) { va_list args; va_start(args, fmt); log(level, va_stringf(args, fmt)); |