diff options
| author | 2023-08-11 12:39:49 +0100 | |
|---|---|---|
| committer | 2023-08-11 12:39:49 +0100 | |
| commit | f73e9e606b61324f4ac34d3f506b7cbaf87713c7 (patch) | |
| tree | 1ca0ac7ed371483bd1d9a3fbec3959af61067dbb /src/modules/extra/m_mysql.cpp | |
| parent | Make the linkdata host/unix cloaks longer to test suffix truncation. (diff) | |
| download | inspircd++-f73e9e606b61324f4ac34d3f506b7cbaf87713c7.tar.gz inspircd++-f73e9e606b61324f4ac34d3f506b7cbaf87713c7.tar.bz2 inspircd++-f73e9e606b61324f4ac34d3f506b7cbaf87713c7.zip | |
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 'src/modules/extra/m_mysql.cpp')
| -rw-r--r-- | src/modules/extra/m_mysql.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<unsigned int>("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; } |
