aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/util
diff options
context:
space:
mode:
authorjaroWMR <jarorutjes07@gmail.com>2024-10-10 07:06:11 +0200
committerjaroWMR <jarorutjes07@gmail.com>2024-10-10 07:06:11 +0200
commit3f22ea7e41a81d3c818bdeb536f8df7ff352ae0f (patch)
tree68fc72eb4c11beb5e1c304b9490fce7192d132f3 /src/crepe/util
parent97621ae53dfc3434cd97e45266bd4f4ac2ef49e1 (diff)
parent29fb4bda4872bdfe33a2416a239fb62fc0238167 (diff)
merge with master
Diffstat (limited to 'src/crepe/util')
-rw-r--r--src/crepe/util/log.cpp10
-rw-r--r--src/crepe/util/log.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/src/crepe/util/log.cpp b/src/crepe/util/log.cpp
index 6829ec3..f91d52c 100644
--- a/src/crepe/util/log.cpp
+++ b/src/crepe/util/log.cpp
@@ -8,10 +8,10 @@
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] ",
+ [log_level::DEBUG] = "[DBG] ",
+ [log_level::INFO] = "[INFO] ",
+ [log_level::WARNING] = "[WARN] ",
+ [log_level::ERROR] = "[ERR] ",
};
static void va_logf(enum log_level level, va_list args, const std::string fmt) {
@@ -38,7 +38,7 @@ static void va_logf(enum log_level level, va_list args, const std::string fmt) {
void crepe::util::logf(const char * fmt, ...) {
va_list args;
va_start(args, fmt);
- va_logf(crepe::util::log_level::debug, args, fmt);
+ va_logf(crepe::util::log_level::DEBUG, args, fmt);
va_end(args);
}
diff --git a/src/crepe/util/log.h b/src/crepe/util/log.h
index bfe7291..2b0fbe1 100644
--- a/src/crepe/util/log.h
+++ b/src/crepe/util/log.h
@@ -7,7 +7,7 @@
// utility macros
#define _crepe_logf_here(fmt, ...) \
- crepe::util::logf(util::log_level::debug, "%s%s (%s:%d)" fmt "\n", \
+ crepe::util::logf(util::log_level::DEBUG, "%s%s (%s:%d)" fmt "\n", \
crepe::util::color::FG_WHITE, __PRETTY_FUNCTION__, \
__FILE_NAME__, __LINE__, crepe::util::color::RESET, \
__VA_ARGS__)
@@ -24,10 +24,10 @@
namespace crepe::util {
enum log_level {
- debug,
- info,
- warning,
- error,
+ DEBUG,
+ INFO,
+ WARNING,
+ ERROR,
};
void logf(const char * fmt, ...);