mirror of
https://github.com/anope/anope.git
synced 2026-07-07 19:03:14 +02:00
Add a module log type
This commit is contained in:
@@ -55,7 +55,7 @@ class DBFlatFile : public Module
|
||||
Log(LOG_DEBUG) << "db_flatfile: Attemping to rename " << DatabaseFile << " to " << newname;
|
||||
if (rename(DatabaseFile.c_str(), newname.c_str()))
|
||||
{
|
||||
Log() << "Unable to back up database!";
|
||||
Log(this) << "Unable to back up database!";
|
||||
|
||||
if (!Config->NoBackupOkay)
|
||||
quitting = true;
|
||||
@@ -88,7 +88,7 @@ class DBFlatFile : public Module
|
||||
if (!databases[NULL]->is_open())
|
||||
{
|
||||
delete databases[NULL];
|
||||
Log() << "Unable to open " << DatabaseFile << " for reading!";
|
||||
Log(this) << "Unable to open " << DatabaseFile << " for reading!";
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ class DBFlatFile : public Module
|
||||
if (!databases[NULL]->is_open())
|
||||
{
|
||||
delete databases[NULL];
|
||||
Log() << "Unable to open " << DatabaseFile << " for writing";
|
||||
Log(this) << "Unable to open " << DatabaseFile << " for writing";
|
||||
if (IsFile(tmp_db))
|
||||
rename(tmp_db.c_str(), DatabaseFile.c_str());
|
||||
return EVENT_CONTINUE;
|
||||
@@ -200,7 +200,7 @@ class DBFlatFile : public Module
|
||||
|
||||
if (databases[NULL]->good() == false)
|
||||
{
|
||||
Log() << "Unable to write database";
|
||||
Log(this) << "Unable to write database";
|
||||
databases[NULL]->close();
|
||||
if (!Config->NoBackupOkay)
|
||||
quitting = true;
|
||||
|
||||
@@ -69,7 +69,7 @@ class DBSQL : public Module, public Pipe
|
||||
if (last_warn + 300 < Anope::CurTime)
|
||||
{
|
||||
last_warn = Anope::CurTime;
|
||||
Log() << "db_sql: Unable to execute query, is SQL configured correctly?";
|
||||
Log(this) << "db_sql: Unable to execute query, is SQL configured correctly?";
|
||||
}
|
||||
}
|
||||
else if (!quitting)
|
||||
@@ -146,7 +146,7 @@ class DBSQL : public Module, public Pipe
|
||||
{
|
||||
if (!this->sql)
|
||||
{
|
||||
Log() << "db_sql: Unable to load databases, is SQL configured correctly?";
|
||||
Log(this) << "Unable to load databases, is SQL configured correctly?";
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ class DBSQL : public Module, public Pipe
|
||||
}
|
||||
catch (const ConvertException &)
|
||||
{
|
||||
Log() << "db_sql: Unable to convert id for object #" << j << " of type " << sb->GetName();
|
||||
Log(this) << "Unable to convert id for object #" << j << " of type " << sb->GetName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user