From 425fd82646bcc08f82ae6dd94de848733a3e3dae Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 22 Apr 2022 22:14:37 +0200 Subject: [PATCH] Always do error logging --- src/utils/logger.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/utils/logger.h b/src/utils/logger.h index fbefdad..40d0888 100644 --- a/src/utils/logger.h +++ b/src/utils/logger.h @@ -34,6 +34,11 @@ extern "C" { WHBLogWritef("[%23s]%30s@L%04d: " FMT "", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \ } 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 #define DEBUG_FUNCTION_LINE_VERBOSE(FMT, ARGS...) while (0) @@ -42,13 +47,13 @@ extern "C" { #define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...) while (0) -#endif - -#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) \ - do { \ - OSReport("## ERROR ## [%23s]%30s@L%04d: ##ERROR## " FMT "\n", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \ +#define DEBUG_FUNCTION_LINE_ERR(FMT, ARGS...) \ + do { \ + OSReport("[%23s]%30s@L%04d: ##ERROR## " FMT "\n", __FILENAME__, __FUNCTION__, __LINE__, ##ARGS); \ } while (0) +#endif + void initLogging(); void deinitLogging();