summaryrefslogtreecommitdiff
path: root/src/logger.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/logger.h')
-rw-r--r--src/logger.h68
1 files changed, 12 insertions, 56 deletions
diff --git a/src/logger.h b/src/logger.h
index 4632c9bbf..52bfca2b4 100644
--- a/src/logger.h
+++ b/src/logger.h
@@ -1,11 +1,11 @@
/*
- * The ManaPlus Client
+ * The ManaVerse Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
* Copyright (C) 2011-2020 The ManaPlus Developers
- * Copyright (C) 2020-2023 The ManaVerse Developers
+ * Copyright (C) 2020-2025 The ManaVerse Developers
*
- * This file is part of The ManaPlus Client.
+ * This file is part of The ManaVerse Client.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -59,9 +59,6 @@ PRAGMA48(GCC diagnostic pop)
#define UNIMPLEMENTEDPACKETFIELD(field) \
logger->unimplemented(msg.getId(), field)
-#define WRONGPACKETSIZE \
- logger->unimplemented(CAST_U32(mId), mLength, mPos)
-
/**
* The Log Class : Useful to write debug or info messages
*/
@@ -94,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.