mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging * correct level for sql.sql * del unused config options * Correct build * correct after merge * whitespace 20:29:37 1. 'Player.cpp'. Replace (1) 20:29:37 2. 'ObjectMgr.cpp'. Replace (3) * 1 * correct logging * correct affter merge * 1 * 2 * LOG_LEVEL_WARN * #include "AppenderDB.h" * 3 * 4 * 5 * 1. 'WorldSocket.cpp'. Replace (1) * 6 * 1
This commit is contained in:
@@ -66,13 +66,13 @@ AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 e
|
||||
GetTarget()->SetVisibleAura(slot, this);
|
||||
SetNeedClientUpdate();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
|
||||
LOG_DEBUG("spells.aura", "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outError("Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
|
||||
LOG_ERROR("server", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
|
||||
ASSERT(HasEffect(effIndex) == (!apply));
|
||||
ASSERT((1 << effIndex) & _effectsToApply);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
|
||||
LOG_DEBUG("spells.aura", "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
|
||||
#endif
|
||||
|
||||
if (apply)
|
||||
@@ -504,7 +504,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication* auraAp
|
||||
// TODO: Figure out why this happens
|
||||
if (itr == m_applications.end())
|
||||
{
|
||||
sLog->outError("Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!",
|
||||
LOG_ERROR("server", "Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!",
|
||||
target->GetGUIDLow(), caster ? caster->GetGUIDLow() : 0, auraApp->GetBase()->GetSpellInfo()->Id);
|
||||
ABORT();
|
||||
}
|
||||
@@ -670,7 +670,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
|
||||
if (!GetOwner()->IsSelfOrInSameMap(itr->first))
|
||||
{
|
||||
//TODO: There is a crash caused by shadowfiend load addon
|
||||
sLog->outCrash("Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
|
||||
LOG_FATAL("server", "Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
|
||||
GetOwner()->GetName().c_str(), GetOwner()->IsInWorld() ? GetOwner()->GetMap()->GetId() : uint32(-1),
|
||||
itr->first->GetName().c_str(), itr->first->IsInWorld() ? itr->first->GetMap()->GetId() : uint32(-1));
|
||||
ABORT();
|
||||
@@ -1112,7 +1112,7 @@ void Aura::UnregisterSingleTarget()
|
||||
caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetCasterGUID(), (Unit*)nullptr);
|
||||
if (!caster)
|
||||
{
|
||||
sLog->outMisc("Aura::UnregisterSingleTarget (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
||||
LOG_INFO("misc", "Aura::UnregisterSingleTarget (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
||||
//ASSERT(caster);
|
||||
}
|
||||
else
|
||||
@@ -1355,7 +1355,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 57531;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
|
||||
}
|
||||
if (spellId)
|
||||
caster->CastSpell(caster, spellId, true);
|
||||
@@ -1480,7 +1480,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 50508;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
|
||||
}
|
||||
caster->CastSpell(target, spellId, true, 0, GetEffect(0));
|
||||
}
|
||||
@@ -1596,7 +1596,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 60946;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
|
||||
}
|
||||
if (spellId)
|
||||
caster->CastSpell(target, spellId, true);
|
||||
@@ -2232,7 +2232,7 @@ void Aura::LoadScripts()
|
||||
continue;
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
|
||||
#endif
|
||||
(*itr)->Register();
|
||||
++itr;
|
||||
|
||||
Reference in New Issue
Block a user