Always do error logging

This commit is contained in:
Maschell 2022-04-22 22:34:07 +02:00
parent 55b2c3da32
commit 8f4713fd3a

View File

@ -34,6 +34,11 @@ extern "C" {
WHBLogWritef("[%23s]%30s@L%04d: " FMT "", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \ WHBLogWritef("[%23s]%30s@L%04d: " FMT "", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \
} while (0) } while (0)
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) \
do { \
WHBLogPrintf("[%23s]%30s@L%04d: ##ERROR## " FMT "\n", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \
} while (0)
#else #else
#define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) while (0) #define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) while (0)
@ -42,13 +47,13 @@ extern "C" {
#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...) while (0) #define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...) while (0)
#endif #define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) \
do { \
#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) \ OSReport("[%23s]%30s@L%04d: ##ERROR## " FMT "\n", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \
do { \
OSReport("## ERROR ## [%23s]%30s@L%04d: ##ERROR## " FMT "\n", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \
} while (0) } while (0)
#endif
void initLogging(); void initLogging();
void deinitLogging(); void deinitLogging();