aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-08-11 12:39:49 +0100
committerGravatar Sadie Powell2023-08-11 12:39:49 +0100
commitf73e9e606b61324f4ac34d3f506b7cbaf87713c7 (patch)
tree1ca0ac7ed371483bd1d9a3fbec3959af61067dbb /include
parentMake the linkdata host/unix cloaks longer to test suffix truncation. (diff)
Rename the error log level to critical.
"ERROR" is apparently defined by more than just Windows. Let's pick a different name which is less likely to cause collisions.
Diffstat (limited to 'include')
-rw-r--r--include/logging.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/include/logging.h b/include/logging.h
index 336c9f6d0..d3d8ca4e9 100644
--- a/include/logging.h
+++ b/include/logging.h
@@ -19,10 +19,6 @@
#pragma once
-#ifdef _WIN32
-# undef ERROR // Defined by WinGDI.h
-#endif
-
namespace Log
{
class Method;
@@ -42,7 +38,7 @@ namespace Log
: uint8_t
{
/** A critical message which must be investigated. */
- ERROR = 0,
+ CRITICAL = 0,
/** An important message which should be investigated. */
WARNING = 1,
@@ -258,24 +254,24 @@ public:
*/
void UnloadEngine(const Engine* engine) ATTR_NOT_NULL(2);
- /** Writes an error message to the server log.
+ /** Writes an critical message to the server log.
* @param type The type of message that is being logged.
* @param message The message to log.
*/
- inline void Error(const std::string& type, const std::string& message)
+ inline void Critical(const std::string& type, const std::string& message)
{
- Write(Level::ERROR, type, message);
+ Write(Level::CRITICAL, type, message);
}
- /** Writes an error message to the server log.
+ /** Writes an critical message to the server log.
* @param type The type of message that is being logged.
* @param format A format string to format and then log.
* @param args One or more arguments to format the string with.
*/
template <typename... Args>
- void Error(const std::string& type, const char* format, Args&&... args)
+ void Critical(const std::string& type, const char* format, Args&&... args)
{
- Write(Level::ERROR, type, fmt::format(format, std::forward<Args>(args)...));
+ Write(Level::CRITICAL, type, fmt::format(format, std::forward<Args>(args)...));
}
/** Writes a warning message to the server log.