aboutsummaryrefslogtreecommitdiff
path: root/src/modules/extra
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 /src/modules/extra
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 'src/modules/extra')
-rw-r--r--src/modules/extra/m_log_syslog.cpp2
-rw-r--r--src/modules/extra/m_mysql.cpp6
-rw-r--r--src/modules/extra/m_pgsql.cpp2
-rw-r--r--src/modules/extra/m_sqlite3.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/extra/m_log_syslog.cpp b/src/modules/extra/m_log_syslog.cpp
index 5feba1957..ec5e8c47b 100644
--- a/src/modules/extra/m_log_syslog.cpp
+++ b/src/modules/extra/m_log_syslog.cpp
@@ -30,7 +30,7 @@ private:
{
switch (level)
{
- case Log::Level::ERROR:
+ case Log::Level::CRITICAL:
return LOG_ERR;
case Log::Level::WARNING:
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;
}
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 97476d2d5..5205a402b 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -308,7 +308,7 @@ public:
bool HandleConnectError(const char* reason)
{
- ServerInstance->Logs.Error(MODNAME, "Could not connect to the \"{}\" database: {}",
+ ServerInstance->Logs.Critical(MODNAME, "Could not connect to the \"{}\" database: {}",
GetId(), reason);
return false;
}
diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp
index b98e4bc9c..919876b6e 100644
--- a/src/modules/extra/m_sqlite3.cpp
+++ b/src/modules/extra/m_sqlite3.cpp
@@ -113,7 +113,7 @@ public:
// Even in case of an error conn must be closed
sqlite3_close(conn);
conn = nullptr;
- ServerInstance->Logs.Error(MODNAME, "WARNING: Could not open DB with id: " + tag->getString("id"));
+ ServerInstance->Logs.Critical(MODNAME, "WARNING: Could not open DB with id: " + tag->getString("id"));
}
}