mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 20:56:37 +00:00
[Performance] Reworked how all log calls are made in the source, see changelog.txt for more details
This commit is contained in:
+5
-5
@@ -361,14 +361,14 @@ bool WorldDatabase::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct*
|
||||
return false;
|
||||
}
|
||||
|
||||
Log.Out(Logs::General, Logs::Status, "SoF Start zone query: %s\n", query.c_str());
|
||||
Log(Logs::General, Logs::Status, "SoF Start zone query: %s\n", query.c_str());
|
||||
|
||||
if (results.RowCount() == 0) {
|
||||
printf("No start_zones entry in database, using defaults\n");
|
||||
isTitanium ? SetTitaniumDefaultStartZone(in_pp, in_cc) : SetSoFDefaultStartZone(in_pp, in_cc);
|
||||
}
|
||||
else {
|
||||
Log.Out(Logs::General, Logs::Status, "Found starting location in start_zones");
|
||||
Log(Logs::General, Logs::Status, "Found starting location in start_zones");
|
||||
auto row = results.begin();
|
||||
in_pp->x = atof(row[0]);
|
||||
in_pp->y = atof(row[1]);
|
||||
@@ -507,7 +507,7 @@ void WorldDatabase::GetLauncherList(std::vector<std::string> &rl) {
|
||||
const std::string query = "SELECT name FROM launcher";
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.Out(Logs::General, Logs::Error, "WorldDatabase::GetLauncherList: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "WorldDatabase::GetLauncherList: %s", results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey)
|
||||
MailKeyString, CharID);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
Log.Out(Logs::General, Logs::Error, "WorldDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "WorldDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str());
|
||||
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ bool WorldDatabase::GetCharacterLevel(const char *name, int &level)
|
||||
std::string query = StringFormat("SELECT level FROM character_data WHERE name = '%s'", name);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log.Out(Logs::General, Logs::Error, "WorldDatabase::GetCharacterLevel: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::General, Logs::Error, "WorldDatabase::GetCharacterLevel: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user