summaryrefslogtreecommitdiff
path: root/modules/database
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-27 08:12:04 -0400
committerAdam <Adam@anope.org>2012-10-27 08:12:04 -0400
commitd6e1b92059688c8b59df0eedccfb16781d193591 (patch)
treee61ace0908bae241ea4cac18331a99b441981dad /modules/database
parentbb5f4555dce8bdfa7124db87c72a084c9d9416a1 (diff)
Add a module log type
Diffstat (limited to 'modules/database')
-rw-r--r--modules/database/db_flatfile.cpp8
-rw-r--r--modules/database/db_sql.cpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp
index 4649a3666..2b31c8a81 100644
--- a/modules/database/db_flatfile.cpp
+++ b/modules/database/db_flatfile.cpp
@@ -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;
diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp
index acc59b668..48c813a3c 100644
--- a/modules/database/db_sql.cpp
+++ b/modules/database/db_sql.cpp
@@ -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();
}
}
}