common: Migrate logging macros

Follow-up of #3533

Replace logging to use NGLOG instead of LOG

This is significantly larger than the previous ones.
This commit is contained in:
Daniel Lim Wee Soong 2018-03-25 18:35:50 +08:00
parent 9283053701
commit 111da6db06
7 changed files with 79 additions and 81 deletions

View file

@ -30,14 +30,14 @@ __declspec(noinline, noreturn)
#define ASSERT(_a_) \
do \
if (!(_a_)) { \
assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \
assert_noinline_call([] { NGLOG_CRITICAL(Debug, "Assertion Failed!"); }); \
} \
while (0)
#define ASSERT_MSG(_a_, ...) \
do \
if (!(_a_)) { \
assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \
assert_noinline_call([&] { NGLOG_CRITICAL(Debug, "Assertion Failed!" __VA_ARGS__); }); \
} \
while (0)
@ -52,5 +52,5 @@ __declspec(noinline, noreturn)
#define DEBUG_ASSERT_MSG(_a_, _desc_, ...)
#endif
#define UNIMPLEMENTED() LOG_CRITICAL(Debug, "Unimplemented code!")
#define UNIMPLEMENTED() NGLOG_CRITICAL(Debug, "Unimplemented code!")
#define UNIMPLEMENTED_MSG(_a_, ...) ASSERT_MSG(false, _a_, __VA_ARGS__)