Skip to content

Commit

Permalink
Merge branch 'axmolengine:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Joilnen authored Jun 27, 2024
2 parents d10b8ee + 5ffd6ce commit e397330
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 266 deletions.
16 changes: 14 additions & 2 deletions core/base/Logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,20 @@ inline void printLogT(_FmtType&& fmt, LogItem& item, _Types&&... args)
#define AXLOG_WITH_LEVEL(level, fmtOrMsg, ...) \
ax::printLogT(FMT_COMPILE("{}" fmtOrMsg "\n"), ax::preprocessLog(ax::LogItem{level}), ##__VA_ARGS__)

#define AXLOGV(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Verbose, fmtOrMsg, ##__VA_ARGS__)
#define AXLOGD(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Debug, fmtOrMsg, ##__VA_ARGS__)
#if defined(_AX_DEBUG) && _AX_DEBUG > 0
# define AXLOGV(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Verbose, fmtOrMsg, ##__VA_ARGS__)
# define AXLOGD(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Debug, fmtOrMsg, ##__VA_ARGS__)
#else
# define AXLOGV(...) \
do \
{ \
} while (0)
# define AXLOGD(...) \
do \
{ \
} while (0)
#endif

#define AXLOGI(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Info, fmtOrMsg, ##__VA_ARGS__)
#define AXLOGW(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Warn, fmtOrMsg, ##__VA_ARGS__)
#define AXLOGE(fmtOrMsg, ...) AXLOG_WITH_LEVEL(ax::LogLevel::Error, fmtOrMsg, ##__VA_ARGS__)
Expand Down
Loading

0 comments on commit e397330

Please sign in to comment.