diff options
| author | Stefan Boberg <[email protected]> | 2021-09-15 13:18:34 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-15 13:18:34 +0200 |
| commit | ab95978c10258cab130ef7e6dc3f7cb7a1bf337d (patch) | |
| tree | a6e4ca55890f5b728f69ccf8878af98ba2e31bc9 /zencore/include | |
| parent | Added #ifdef condition around Windows-specific exception handling (diff) | |
| parent | Cross-platform zen::GetLastError() (diff) | |
| download | zen-ab95978c10258cab130ef7e6dc3f7cb7a1bf337d.tar.xz zen-ab95978c10258cab130ef7e6dc3f7cb7a1bf337d.zip | |
Merged from main
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/logging.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/zencore/include/zencore/logging.h b/zencore/include/zencore/logging.h index a2404a5e9..eefed4efa 100644 --- a/zencore/include/zencore/logging.h +++ b/zencore/include/zencore/logging.h @@ -20,3 +20,20 @@ void InitializeLogging(); void ShutdownLogging(); } // namespace zen::logging + +namespace zen { +spdlog::logger& Log(); +using logging::ConsoleLog; +} // namespace zen + +using zen::ConsoleLog; +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__) |