5#ifndef SAPPHIRE_LOGGER_LOG_RAII_GUARD
6#define SAPPHIRE_LOGGER_LOG_RAII_GUARD
44 #define __SA_SELECT_LOG_RAII_MACRO(_1, _2, _3, _4, _name, ...) _name
46 #define __SA_LOG_RAII4(_str, _lvl, _chan, _dets) __SA_CREATE_LOG(_str, _lvl, _chan, _dets)
47 #define __SA_LOG_RAII3(_str, _lvl, _chan) __SA_LOG_RAII4(_str, _lvl, _chan, L"")
48 #define __SA_LOG_RAII2(_str, _lvl) __SA_LOG_RAII3(_str, _lvl, Default)
49 #define __SA_LOG_RAII1(_str) __SA_LOG_RAII2(_str, Normal)
69 #define SA_LOG_RAII((_str, _args), _lvl, _chan, _dets)
71#elif SA_DEBUG || SA_LOG_RELEASE_OPT
73 #define SA_LOG_RAII(...) SA::LogRAII __SA_EVAL_PASTE(__log_raii, __LINE__)(\
74 __SA_SELECT_LOG_RAII_MACRO(__VA_ARGS__, __SA_LOG_RAII4, __SA_LOG_RAII3, __SA_LOG_RAII2, __SA_LOG_RAII1)(__VA_ARGS__)\
79 #define SA_LOG_RAII(...) {}
Log Helper Macros implementation.
Log type implementation.
Definition Log.hpp:25
Log RAII type implementation. Delays the log at the end of the scope.
Definition LogRAII.hpp:27
LogRAII(Log &&_log)
Construct RAII with log handle.
~LogRAII()
Destructor calling logger.