[Performance] Reworked how all log calls are made in the source, see changelog.txt for more details

This commit is contained in:
Akkadius
2017-04-01 03:51:46 -05:00
parent 93a6efa95f
commit 7aa1d243b0
131 changed files with 3126 additions and 3066 deletions
+7 -7
View File
@@ -134,7 +134,7 @@ bool PersistentTimer::Load(Database *db) {
(unsigned long)_char_id, _type);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
Log.Out(Logs::General, Logs::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
Log(Logs::General, Logs::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
return false;
}
@@ -166,7 +166,7 @@ bool PersistentTimer::Store(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Out(Logs::General, Logs::Error, "Error in PersistentTimer::Store, error: %s", results.ErrorMessage().c_str());
Log(Logs::General, Logs::Error, "Error in PersistentTimer::Store, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@@ -186,7 +186,7 @@ bool PersistentTimer::Clear(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Out(Logs::General, Logs::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
Log(Logs::General, Logs::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@@ -198,7 +198,7 @@ bool PersistentTimer::Clear(Database *db) {
/* This function checks if the timer triggered */
bool PersistentTimer::Expired(Database *db, bool iReset) {
if (this == nullptr) {
Log.Out(Logs::General, Logs::Error, "Null timer during ->Check()!?\n");
Log(Logs::General, Logs::Error, "Null timer during ->Check()!?\n");
return(true);
}
uint32 current_time = get_current_time();
@@ -290,7 +290,7 @@ bool PTimerList::Load(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Out(Logs::General, Logs::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
Log(Logs::General, Logs::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@@ -349,7 +349,7 @@ bool PTimerList::Clear(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Out(Logs::General, Logs::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
Log(Logs::General, Logs::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@@ -441,7 +441,7 @@ bool PTimerList::ClearOffline(Database *db, uint32 char_id, pTimerType type) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Out(Logs::General, Logs::Error, "Error in PTimerList::ClearOffline, error: %s", results.ErrorMessage().c_str());
Log(Logs::General, Logs::Error, "Error in PTimerList::ClearOffline, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}