Skip to content

Logging

A edited this page Aug 30, 2022 · 1 revision

AGE::Log (Class)

header: Age/Log.h

Static class for logging. Although using this class for logging is not recommended, but macros defined in "Log.h" should be used instead.

There are two loggers available, core logger (e.g. AGE_CORE_ERROR) for logging inside the engine and app logger (e.g. AGE_ERROR) for logging inside client apps.

Variables

Name Description
private static std::shared_ptrspdlog::logger s_CoreLogger Pointer to the core logger
private static std::shared_ptrspdlog::logger s_ClientLogger Pointer to the client logger

Methods

Name Description
static std::shared_ptrspdlog::logger& GetCoreLogger() Returns reference to s_CoreLogger
static std::shared_ptrspdlog::logger& GetClientLogger() Returns reference to s_ClientLogger
static void Init() Initializes loggers

Logging macros

It is recommended to use these macros for logging as they will be striped out on NDEBUG environments.

Name Description
debug only AGE_TRACE(...)
debug only AGE_INFO(...)
debug only AGE_ERROR(...)
debug only AGE_CRITICAL(...)
debug only AGE_CORE_TRACE(...)
debug only AGE_CORE_INFO(...)
debug only AGE_CORE_ERROR(...)
debug only AGE_CORE_CRITICAL(...)

Clone this wiki locally