aboutsummaryrefslogtreecommitdiff
path: root/zencore
diff options
context:
space:
mode:
Diffstat (limited to 'zencore')
-rw-r--r--zencore/include/zencore/logging.h14
-rw-r--r--zencore/logging.cpp4
2 files changed, 10 insertions, 8 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__)
diff --git a/zencore/logging.cpp b/zencore/logging.cpp
index 9d5a726f5..00ec845b4 100644
--- a/zencore/logging.cpp
+++ b/zencore/logging.cpp
@@ -9,7 +9,7 @@ namespace zen {
spdlog::logger&
Log()
{
- return *spdlog::default_logger();
+ return *spdlog::default_logger_raw();
}
} // namespace zen
@@ -19,7 +19,7 @@ namespace zen::logging {
spdlog::logger&
Default()
{
- return *spdlog::default_logger();
+ return *spdlog::default_logger_raw();
}
spdlog::logger&