From ffd45d6a5bd1e95065da71f00b6a9107b805c3ae Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 15 Sep 2021 15:22:36 +0200 Subject: 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 --- zencore/include/zencore/logging.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'zencore/include') 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__) -- cgit v1.2.3