aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-09-12 23:38:47 +0200
committerGitHub <[email protected]>2022-09-12 14:38:47 -0700
commitef89c146f6ef3f0091ce2f4736cbda2dd7cf84a0 (patch)
tree5cc20561b428de8c0d271286d63cd6d69d6abc92 /zencore/include
parentcreate release in Sentry and set version string in executable (#162) (diff)
downloadzen-ef89c146f6ef3f0091ce2f4736cbda2dd7cf84a0.tar.xz
zen-ef89c146f6ef3f0091ce2f4736cbda2dd7cf84a0.zip
enable json log file (#164)
* Include source location on ZEN_ERROR and ZEN_CRITICAL * Use proper logging for sentry init status * format file logger as json if .json extension is given * changelog
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/logging.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/zencore/include/zencore/logging.h b/zencore/include/zencore/logging.h
index 7c2deeed7..45dbd8c56 100644
--- a/zencore/include/zencore/logging.h
+++ b/zencore/include/zencore/logging.h
@@ -129,18 +129,18 @@ struct LogCategory
Log().warn(fmtstr##sv, ##__VA_ARGS__); \
} while (false)
-#define ZEN_ERROR(fmtstr, ...) \
- do \
- { \
- using namespace std::literals; \
- Log().error(fmtstr##sv, ##__VA_ARGS__); \
+#define ZEN_ERROR(fmtstr, ...) \
+ do \
+ { \
+ using namespace std::literals; \
+ Log().log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, spdlog::level::err, fmtstr##sv, ##__VA_ARGS__); \
} while (false)
-#define ZEN_CRITICAL(fmtstr, ...) \
- do \
- { \
- using namespace std::literals; \
- Log().critical(fmtstr##sv, ##__VA_ARGS__); \
+#define ZEN_CRITICAL(fmtstr, ...) \
+ do \
+ { \
+ using namespace std::literals; \
+ Log().log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, spdlog::level::critical, fmtstr##sv, ##__VA_ARGS__); \
} while (false)
#define ZEN_CONSOLE(fmtstr, ...) \