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/m_xline_db.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_xline_db.cpp') diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index aa79e1e10..a387caefc 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -128,7 +128,7 @@ public: std::ofstream stream(xlinenewdbpath); if (!stream.is_open()) { - ServerInstance->Logs.Error(MODNAME, "Cannot create database \"{}\"! {} ({})", xlinenewdbpath, strerror(errno), errno); + ServerInstance->Logs.Critical(MODNAME, "Cannot create database \"{}\"! {} ({})", xlinenewdbpath, strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot create new xline db \"{}\": {} ({})", xlinenewdbpath, strerror(errno), errno); return false; } @@ -166,7 +166,7 @@ public: if (stream.fail()) { - ServerInstance->Logs.Error(MODNAME, "Cannot write to new database \"{}\"! {} ({})", xlinenewdbpath, strerror(errno), errno); + ServerInstance->Logs.Critical(MODNAME, "Cannot write to new database \"{}\"! {} ({})", xlinenewdbpath, strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot write to new xline db \"{}\": {} ({})", xlinenewdbpath, strerror(errno), errno); return false; } @@ -178,7 +178,7 @@ public: // Use rename to move temporary to new db - this is guaranteed not to fuck up, even in case of a crash. if (rename(xlinenewdbpath.c_str(), xlinedbpath.c_str()) < 0) { - ServerInstance->Logs.Error(MODNAME, "Cannot replace old database \"{}\" with new database \"{}\"! {} ({})", xlinedbpath, xlinenewdbpath, strerror(errno), errno); + ServerInstance->Logs.Critical(MODNAME, "Cannot replace old database \"{}\" with new database \"{}\"! {} ({})", xlinedbpath, xlinenewdbpath, strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot replace old xline db \"{}\" with new db \"{}\": {} ({})", xlinedbpath, xlinenewdbpath, strerror(errno), errno); return false; } @@ -196,7 +196,7 @@ public: std::ifstream stream(xlinedbpath); if (!stream.is_open()) { - ServerInstance->Logs.Error(MODNAME, "Cannot read database \"{}\"! {} ({})", xlinedbpath, strerror(errno), errno); + ServerInstance->Logs.Critical(MODNAME, "Cannot read database \"{}\"! {} ({})", xlinedbpath, strerror(errno), errno); ServerInstance->SNO.WriteToSnoMask('x', "database: cannot read xline db \"{}\": {} ({})", xlinedbpath, strerror(errno), errno); return false; } @@ -223,7 +223,7 @@ public: if (command_p[1] != "1") { stream.close(); - ServerInstance->Logs.Error(MODNAME, "I got database version {} - I don't understand it", command_p[1]); + ServerInstance->Logs.Critical(MODNAME, "I got database version {} - I don't understand it", command_p[1]); ServerInstance->SNO.WriteToSnoMask('x', "database: I got a database version ({}) I don't understand", command_p[1]); return false; } -- cgit v1.3.1-10-gc9f91