Renamed DoLog to Out as the aggregate logging function for simplicity of use and shortened syntax of Log.Out

This commit is contained in:
Akkadius
2015-01-18 02:00:15 -06:00
parent 1c048cb1d1
commit c025765283
119 changed files with 2653 additions and 2653 deletions
+11 -11
View File
@@ -42,7 +42,7 @@ void EQLConfig::LoadSettings() {
std::string query = StringFormat("SELECT dynamics FROM launcher WHERE name = '%s'", namebuf);
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
else {
auto row = results.begin();
m_dynamics = atoi(row[0]);
@@ -51,7 +51,7 @@ void EQLConfig::LoadSettings() {
query = StringFormat("SELECT zone, port FROM launcher_zones WHERE launcher = '%s'", namebuf);
results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
return;
}
@@ -73,7 +73,7 @@ EQLConfig *EQLConfig::CreateLauncher(const char *name, uint8 dynamic_count) {
std::string query = StringFormat("INSERT INTO launcher (name, dynamics) VALUES('%s', %d)", namebuf, dynamic_count);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CreateLauncher query: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CreateLauncher query: %s", results.ErrorMessage().c_str());
return nullptr;
}
@@ -118,14 +118,14 @@ void EQLConfig::DeleteLauncher() {
std::string query = StringFormat("DELETE FROM launcher WHERE name = '%s'", namebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteLauncher 1st query: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteLauncher 1st query: %s", results.ErrorMessage().c_str());
return;
}
query = StringFormat("DELETE FROM launcher_zones WHERE launcher = '%s'", namebuf);
results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteLauncher 2nd query: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteLauncher 2nd query: %s", results.ErrorMessage().c_str());
return;
}
}
@@ -173,7 +173,7 @@ bool EQLConfig::BootStaticZone(Const_char *short_name, uint16 port) {
"VALUES('%s', '%s', %d)", namebuf, zonebuf, port);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in BootStaticZone query: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in BootStaticZone query: %s", results.ErrorMessage().c_str());
return false;
}
@@ -202,7 +202,7 @@ bool EQLConfig::ChangeStaticZone(Const_char *short_name, uint16 port) {
res = m_zones.find(short_name);
if(res == m_zones.end()) {
//not found.
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
return false;
}
@@ -217,7 +217,7 @@ bool EQLConfig::ChangeStaticZone(Const_char *short_name, uint16 port) {
"launcher = '%s' AND zone = '%s'",port, namebuf, zonebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ChangeStaticZone query: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ChangeStaticZone query: %s", results.ErrorMessage().c_str());
return false;
}
@@ -239,7 +239,7 @@ bool EQLConfig::DeleteStaticZone(Const_char *short_name) {
res = m_zones.find(short_name);
if(res == m_zones.end()) {
//not found.
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
return false;
}
@@ -254,7 +254,7 @@ bool EQLConfig::DeleteStaticZone(Const_char *short_name) {
"launcher = '%s' AND zone = '%s'", namebuf, zonebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteStaticZone query: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteStaticZone query: %s", results.ErrorMessage().c_str());
return false;
}
@@ -279,7 +279,7 @@ bool EQLConfig::SetDynamicCount(int count) {
std::string query = StringFormat("UPDATE launcher SET dynamics=%d WHERE name='%s'", count, namebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.DoLog(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SetDynamicCount query: %s", results.ErrorMessage().c_str());
Log.Out(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SetDynamicCount query: %s", results.ErrorMessage().c_str());
return false;
}