From 6a5d207920f030e54710af12463f4a701c09b118 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 15 Sep 2021 10:15:24 +0200 Subject: Changed direct includes of spdlog/spdlog.h into zencore/logging.h to make it easier to tweak implementation --- zencore/iobuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zencore/iobuffer.cpp') diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index 9c7781663..10d43498c 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -6,12 +6,12 @@ #include #include #include +#include #include #include #include #include -#include #include namespace zen { -- cgit v1.2.3 From 2b9bed6635d95e15847c4d9b602e34d90e277d14 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 15 Sep 2021 11:27:48 +0200 Subject: Changed logging implementation * Code should no longer directly `#include spdlog/spdlog.h`, instead use `#include ` * Instead of explicit calls to `spdlog::info(...)` and such please use the logging macros defined in `zencore/logging.h`. I.e `ZEN_INFO`, `ZEN_DEBUG`, `ZEN_TRACE`, `ZEN_ERROR`, `ZEN_CRITITCAL` * The macros will pick up the "most local" logger via a `Log()` call to retrieve a logger instance. To override the default logger in a class please implement your own `Log()` function --- zencore/iobuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zencore/iobuffer.cpp') diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index 10d43498c..14ba77ea6 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -165,7 +165,7 @@ IoBufferExtendedCore::~IoBufferExtendedCore() if (!Success) { - spdlog::warn("Error reported on file handle close!"); + ZEN_WARN("Error reported on file handle close!"); } } -- cgit v1.2.3 From 07180ad240b52699a00f4edc38881bf905eabc52 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 15 Sep 2021 14:57:39 +0200 Subject: Fixed up invalid fmt formatting strings --- zencore/iobuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zencore/iobuffer.cpp') diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index 14ba77ea6..758cf539c 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -220,7 +220,7 @@ IoBufferExtendedCore::Materialize() const { throw std::system_error( std::error_code(::GetLastError(), std::system_category()), - "MapViewOfFile failed (offset {#x}, size {#x}) file: '{}'"_format(MapOffset, MapSize, zen::PathFromHandle(m_FileHandle))); + "MapViewOfFile failed (offset {:#x}, size {:#x}) file: '{}'"_format(MapOffset, MapSize, zen::PathFromHandle(m_FileHandle))); } m_MappedPointer = MappedBase; -- cgit v1.2.3