aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_xline_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_xline_db.cpp')
-rw-r--r--src/modules/m_xline_db.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
index f40c2729c..8d9a8f936 100644
--- a/src/modules/m_xline_db.cpp
+++ b/src/modules/m_xline_db.cpp
@@ -105,17 +105,17 @@ public:
* Technically, that means that this can block, but I have *never* seen that.
* -- w00t
*/
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Opening temporary database");
+ ServerInstance->Logs.Debug(MODNAME, "Opening temporary database");
std::string xlinenewdbpath = xlinedbpath + ".new";
std::ofstream stream(xlinenewdbpath);
if (!stream.is_open())
{
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot create database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno);
+ ServerInstance->Logs.Debug(MODNAME, "Cannot create database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('x', "database: cannot create new xline db \"%s\": %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno);
return false;
}
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Opened. Writing..");
+ ServerInstance->Logs.Debug(MODNAME, "Opened. Writing..");
/*
* Now, much as I hate writing semi-unportable formats, additional
@@ -144,11 +144,11 @@ public:
}
}
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Finished writing XLines. Checking for error..");
+ ServerInstance->Logs.Debug(MODNAME, "Finished writing XLines. Checking for error..");
if (stream.fail())
{
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot write to new database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno);
+ ServerInstance->Logs.Debug(MODNAME, "Cannot write to new database \"%s\"! %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('x', "database: cannot write to new xline db \"%s\": %s (%d)", xlinenewdbpath.c_str(), strerror(errno), errno);
return false;
}
@@ -160,7 +160,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.Log(MODNAME, LOG_DEBUG, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno);
+ ServerInstance->Logs.Debug(MODNAME, "Cannot replace old database \"%s\" with new database \"%s\"! %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('x', "database: cannot replace old xline db \"%s\" with new db \"%s\": %s (%d)", xlinedbpath.c_str(), xlinenewdbpath.c_str(), strerror(errno), errno);
return false;
}
@@ -178,7 +178,7 @@ public:
std::ifstream stream(xlinedbpath);
if (!stream.is_open())
{
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Cannot read database \"%s\"! %s (%d)", xlinedbpath.c_str(), strerror(errno), errno);
+ ServerInstance->Logs.Debug(MODNAME, "Cannot read database \"%s\"! %s (%d)", xlinedbpath.c_str(), strerror(errno), errno);
ServerInstance->SNO.WriteToSnoMask('x', "database: cannot read xline db \"%s\": %s (%d)", xlinedbpath.c_str(), strerror(errno), errno);
return false;
}
@@ -198,14 +198,14 @@ public:
items++;
}
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Processing %s", line.c_str());
+ ServerInstance->Logs.Debug(MODNAME, "Processing %s", line.c_str());
if (command_p[0] == "VERSION")
{
if (command_p[1] != "1")
{
stream.close();
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "I got database version %s - I don't understand it", command_p[1].c_str());
+ ServerInstance->Logs.Debug(MODNAME, "I got database version %s - I don't understand it", command_p[1].c_str());
ServerInstance->SNO.WriteToSnoMask('x', "database: I got a database version (%s) I don't understand", command_p[1].c_str());
return false;
}