diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:49:37 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:49:37 +0100 |
commit | fdd5c471dffd4a204a91e8d1d70567fa56ea29a5 (patch) | |
tree | ece2c3e32261fe9b0f7ccd3aa3bd4e98f74e3b28 /src/crepe/util | |
parent | e8cd950b8ebd152d76d588d4fedc7f4c239b0835 (diff) |
`make format`
Diffstat (limited to 'src/crepe/util')
-rw-r--r-- | src/crepe/util/Log.h | 15 | ||||
-rw-r--r-- | src/crepe/util/Log.hpp | 3 |
2 files changed, 7 insertions, 11 deletions
diff --git a/src/crepe/util/Log.h b/src/crepe/util/Log.h index e0844ca..d55b11e 100644 --- a/src/crepe/util/Log.h +++ b/src/crepe/util/Log.h @@ -9,16 +9,14 @@ // utility macros #define _crepe_logf_here(level, fmt, ...) \ - crepe::Log::logf( \ - level, "{}" fmt, \ - crepe::LogColor().fg_white(false).str(std::format( \ - "{} ({}:{})", __PRETTY_FUNCTION__, __FILE_NAME__, __LINE__)), \ - __VA_ARGS__) + crepe::Log::logf(level, "{}" fmt, \ + crepe::LogColor().fg_white(false).str(std::format( \ + "{} ({}:{})", __PRETTY_FUNCTION__, __FILE_NAME__, __LINE__)), \ + __VA_ARGS__) // very illegal global function-style macros // NOLINTBEGIN -#define dbg_logf(fmt, ...) \ - _crepe_logf_here(crepe::Log::Level::DEBUG, ": " fmt, __VA_ARGS__) +#define dbg_logf(fmt, ...) _crepe_logf_here(crepe::Log::Level::DEBUG, ": " fmt, __VA_ARGS__) #define dbg_log(str) _crepe_logf_here(crepe::Log::Level::DEBUG, ": {}", str) #define dbg_trace() _crepe_logf_here(crepe::Log::Level::TRACE, "", "") // NOLINTEND @@ -59,8 +57,7 @@ public: * \param args Format arguments */ template <class... Args> - static void logf(const Level & level, std::format_string<Args...> fmt, - Args &&... args); + static void logf(const Level & level, std::format_string<Args...> fmt, Args &&... args); /** * \brief Format a message and log it (with default severity \c INFO) diff --git a/src/crepe/util/Log.hpp b/src/crepe/util/Log.hpp index 651f076..c2156cd 100644 --- a/src/crepe/util/Log.hpp +++ b/src/crepe/util/Log.hpp @@ -10,8 +10,7 @@ void Log::logf(std::format_string<Args...> fmt, Args &&... args) { } template <class... Args> -void Log::logf(const Level & level, std::format_string<Args...> fmt, - Args &&... args) { +void Log::logf(const Level & level, std::format_string<Args...> fmt, Args &&... args) { Log::log(level, std::format(fmt, std::forward<Args>(args)...)); } |