diff options
| author | Stefan Boberg <[email protected]> | 2021-09-15 15:22:36 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-15 15:22:36 +0200 |
| commit | ffd45d6a5bd1e95065da71f00b6a9107b805c3ae (patch) | |
| tree | ee0b16a4220e15ce58332552757781e6c93f9829 /zencore/include | |
| parent | Switched some Jupiter logging to not use `_format` - this is handled by the l... (diff) | |
| download | zen-ffd45d6a5bd1e95065da71f00b6a9107b805c3ae.tar.xz zen-ffd45d6a5bd1e95065da71f00b6a9107b805c3ae.zip | |
Made logging macros always append `sv` string_view literal suffix
Fixed up the few instances of explicit string_view arguments to make sure they compile properly with the new macros
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/logging.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/zencore/include/zencore/logging.h b/zencore/include/zencore/logging.h index eefed4efa..4996463fd 100644 --- a/zencore/include/zencore/logging.h +++ b/zencore/include/zencore/logging.h @@ -31,9 +31,11 @@ using zen::Log; // Helper macros for logging -#define ZEN_TRACE(...) Log().trace(__VA_ARGS__) -#define ZEN_DEBUG(...) Log().debug(__VA_ARGS__) -#define ZEN_INFO(...) Log().info(__VA_ARGS__) -#define ZEN_WARN(...) Log().warn(__VA_ARGS__) -#define ZEN_ERROR(...) Log().error(__VA_ARGS__) -#define ZEN_CRITICAL(...) Log().critical(__VA_ARGS__) +using namespace std::literals; + +#define ZEN_TRACE(fmtstr, ...) Log().trace(fmtstr##sv, __VA_ARGS__) +#define ZEN_DEBUG(fmtstr, ...) Log().debug(fmtstr##sv, __VA_ARGS__) +#define ZEN_INFO(fmtstr, ...) Log().info(fmtstr##sv, __VA_ARGS__) +#define ZEN_WARN(fmtstr, ...) Log().warn(fmtstr##sv, __VA_ARGS__) +#define ZEN_ERROR(fmtstr, ...) Log().error(fmtstr##sv, __VA_ARGS__) +#define ZEN_CRITICAL(fmtstr, ...) Log().critical(fmtstr##sv, __VA_ARGS__) |