From f73e9e606b61324f4ac34d3f506b7cbaf87713c7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 11 Aug 2023 12:39:49 +0100 Subject: 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. --- src/modules/extra/m_mysql.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/extra/m_mysql.cpp') diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index e063185ae..ffb6cf0e9 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -337,7 +337,7 @@ public: unsigned int port = config->getNum("port", 3306, 1, 65535); if (!mysql_real_connect(connection, host.c_str(), user.c_str(), pass.c_str(), dbname.c_str(), port, nullptr, CLIENT_IGNORE_SIGPIPE)) { - ServerInstance->Logs.Error(MODNAME, "Unable to connect to the {} MySQL server: {}", + ServerInstance->Logs.Critical(MODNAME, "Unable to connect to the {} MySQL server: {}", GetId(), mysql_error(connection)); return false; } @@ -346,7 +346,7 @@ public: const std::string charset = config->getString("charset"); if (!charset.empty() && mysql_set_character_set(connection, charset.c_str())) { - ServerInstance->Logs.Error(MODNAME, "Could not set character set for {} to \"{}\": {}", + ServerInstance->Logs.Critical(MODNAME, "Could not set character set for {} to \"{}\": {}", GetId(), charset, mysql_error(connection)); return false; } @@ -355,7 +355,7 @@ public: const std::string initialquery = config->getString("initialquery"); if (!initialquery.empty() && mysql_real_query(connection, initialquery.data(), initialquery.length())) { - ServerInstance->Logs.Error(MODNAME, "Could not execute initial query \"{}\" for {}: {}", + ServerInstance->Logs.Critical(MODNAME, "Could not execute initial query \"{}\" for {}: {}", initialquery, name, mysql_error(connection)); return false; } -- cgit v1.3.1-10-gc9f91