diff options
Diffstat (limited to 'src/logger.h')
-rw-r--r-- | src/logger.h | 59 |
1 files changed, 9 insertions, 50 deletions
diff --git a/src/logger.h b/src/logger.h index b8c48e429..da165189d 100644 --- a/src/logger.h +++ b/src/logger.h @@ -91,64 +91,23 @@ class Logger final /** * Enters a message in the log. The message will be timestamped. */ - void log(const char *const log_text, ...) A_NONNULL(2) -#ifdef __GNUC__ -#ifdef __OpenBSD__ - - __attribute__((__format__(printf, 2, 3))) -#else // __OpenBSD__ - -#ifdef BAD_CILKPLUS - __attribute__((__format__(gnu_printf, 1, 2))) -#else // BAD_CILKPLUS - - __attribute__((__format__(gnu_printf, 2, 3))) -#endif // BAD_CILKPLUS - -#endif // __OpenBSD__ -#endif // __GNUC__ - ; + void log(const char *const log_text, ...) + A_NONNULL(2) + A_FORMAT_PRINTF(true, 1, 2); /** * Enters a message in the log. The message will be timestamped. */ - void assertLog(const char *const log_text, ...) A_NONNULL(2) -#ifdef __GNUC__ -#ifdef __OpenBSD__ - - __attribute__((__format__(printf, 2, 3))) -#else // __OpenBSD__ - -#ifdef BAD_CILKPLUS - __attribute__((__format__(gnu_printf, 1, 2))) -#else // BAD_CILKPLUS - - __attribute__((__format__(gnu_printf, 2, 3))) -#endif // BAD_CILKPLUS - -#endif // __OpenBSD__ -#endif // __GNUC__ - ; + void assertLog(const char *const log_text, ...) + A_NONNULL(2) + A_FORMAT_PRINTF(true, 1, 2); /** * Enters a message in the log (thread safe). */ - void log_r(const char *const log_text, ...) A_NONNULL(2) -#ifdef __GNUC__ -#ifdef __OpenBSD__ - __attribute__((__format__(printf, 2, 3))) -#else // __OpenBSD__ - -#ifdef BAD_CILKPLUS - __attribute__((__format__(gnu_printf, 1, 2))) -#else // BAD_CILKPLUS - - __attribute__((__format__(gnu_printf, 2, 3))) -#endif // BAD_CILKPLUS - -#endif // __OpenBSD__ -#endif // __GNUC__ - ; + void log_r(const char *const log_text, ...) + A_NONNULL(2) + A_FORMAT_PRINTF(true, 1, 2); /** * Enters a message in the log. The message will be timestamped. |