diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 10:56:19 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-24 10:56:19 +0200 |
commit | e7377daf2fe3b759fbbf7e57f88c412c3b1cf011 (patch) | |
tree | d4b3af9e752b0e42116b992d27654bac5c5710ad /src/crepe/util/log.cpp | |
parent | 58465175e761a908752542255fe584ce3aa1d163 (diff) |
`make format`
Diffstat (limited to 'src/crepe/util/log.cpp')
-rw-r--r-- | src/crepe/util/log.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/crepe/util/log.cpp b/src/crepe/util/log.cpp index 5ff2ad4..6bcc4ae 100644 --- a/src/crepe/util/log.cpp +++ b/src/crepe/util/log.cpp @@ -3,20 +3,25 @@ #include <cstdlib> #include <string> +#include "../api/Config.h" #include "fmt.h" #include "log.h" -#include "../api/Config.h" using namespace crepe::util; using namespace std; string log_prefix(LogLevel level) { switch (level) { - case LogLevel::TRACE: return LogColor().fg_white().str("[TRACE]") + " "; - case LogLevel::DEBUG: return LogColor().fg_magenta().str("[DEBUG]") + " "; - case LogLevel::INFO: return LogColor().fg_blue().str("[INFO]") + " "; - case LogLevel::WARNING: return LogColor().fg_yellow().str("[WARN]") + " "; - case LogLevel::ERROR: return LogColor().fg_red().str("[ERROR]") + " "; + case LogLevel::TRACE: + return LogColor().fg_white().str("[TRACE]") + " "; + case LogLevel::DEBUG: + return LogColor().fg_magenta().str("[DEBUG]") + " "; + case LogLevel::INFO: + return LogColor().fg_blue().str("[INFO]") + " "; + case LogLevel::WARNING: + return LogColor().fg_yellow().str("[WARN]") + " "; + case LogLevel::ERROR: + return LogColor().fg_red().str("[ERROR]") + " "; } return ""; } @@ -46,4 +51,3 @@ void crepe::util::logf(LogLevel level, const char * fmt, ...) { log(level, va_stringf(args, fmt)); va_end(args); } - |