aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/util/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/util/log.cpp')
-rw-r--r--src/crepe/util/log.cpp18
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);
}
-