diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 15:50:13 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 15:50:13 +0100 |
commit | 5e59c22f77073fdf49bf98697da6a68819eb5776 (patch) | |
tree | ed53c8306c93825e9a33d642ae976ec97eb94fb1 /src/crepe/util/Log.h | |
parent | 7ec392eda3345606f0de75a432954b221cee82ce (diff) |
`make format`
Diffstat (limited to 'src/crepe/util/Log.h')
-rw-r--r-- | src/crepe/util/Log.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/crepe/util/Log.h b/src/crepe/util/Log.h index 4e32e9d..01452b2 100644 --- a/src/crepe/util/Log.h +++ b/src/crepe/util/Log.h @@ -8,7 +8,12 @@ #include "LogColor.h" // 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__) +#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__) // very illegal global function-style macros // NOLINTBEGIN @@ -53,8 +58,9 @@ public: * \param fmt Message format * \param args Format arguments */ - template<class... Args> - static void logf(const Level & level, std::format_string<Args...> fmt, Args&&... args); + template <class... 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) @@ -62,8 +68,8 @@ public: * \param fmt Message format * \param args Format arguments */ - template<class... Args> - static void logf(std::format_string<Args...> fmt, Args&&... args); + template <class... Args> + static void logf(std::format_string<Args...> fmt, Args &&... args); private: /** @@ -77,4 +83,3 @@ private: } // namespace crepe #include "Log.hpp" - |