Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
Memleak fix
This commit is contained in:
@@ -203,7 +203,7 @@ public:
|
||||
target->SetMaxPower(POWER_ENERGY, energym);
|
||||
target->SetPower(POWER_ENERGY, energy);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
|
||||
TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_ENERGY), target->GetMaxPower(POWER_ENERGY));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1019,7 +1019,7 @@ public:
|
||||
{
|
||||
int32 newmoney = int32(targetMoney) + moneyToAdd;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
|
||||
TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_CURRENT_MONEY), targetMoney, moneyToAdd, newmoney);
|
||||
if (newmoney <= 0)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
|
||||
@@ -1054,7 +1054,7 @@ public:
|
||||
target->ModifyMoney(moneyToAdd);
|
||||
}
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
|
||||
TC_LOG_DEBUG(LOG_FILTER_GENERAL, handler->GetTrinityString(LANG_NEW_MONEY), targetMoney, moneyToAdd, target->GetMoney());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user