diff options
| author | Spp <spp@jorge.gr> | 2013-11-08 10:50:51 +0100 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2013-11-08 10:50:51 +0100 |
| commit | 94e2b9332a1f6ceec024338b8f41cd3dca099a40 (patch) | |
| tree | c907b9f17ca4ca37d405bb1aca6439645e366a4b /src/server/game/Entities/Object | |
| parent | 16a51e328a12b8eafb7ff2c18806ca9aef6b23a2 (diff) | |
Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive)
Diffstat (limited to 'src/server/game/Entities/Object')
| -rw-r--r-- | src/server/game/Entities/Object/Object.cpp | 60 | ||||
| -rw-r--r-- | src/server/game/Entities/Object/Updates/UpdateData.cpp | 10 |
2 files changed, 35 insertions, 35 deletions
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index b7417c0e7c6..675504cd668 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -91,7 +91,7 @@ WorldObject::~WorldObject() { if (GetTypeId() == TYPEID_CORPSE) { - TC_LOG_FATAL(LOG_FILTER_GENERAL, "Object::~Object Corpse guid=" UI64FMTD ", type=%d, entry=%u deleted but still in map!!", + TC_LOG_FATAL("misc", "Object::~Object Corpse guid=" UI64FMTD ", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry()); ASSERT(false); } @@ -103,16 +103,16 @@ Object::~Object() { if (IsInWorld()) { - TC_LOG_FATAL(LOG_FILTER_GENERAL, "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry()); + TC_LOG_FATAL("misc", "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry()); if (isType(TYPEMASK_ITEM)) - TC_LOG_FATAL(LOG_FILTER_GENERAL, "Item slot %u", ((Item*)this)->GetSlot()); + TC_LOG_FATAL("misc", "Item slot %u", ((Item*)this)->GetSlot()); ASSERT(false); RemoveFromWorld(); } if (m_objectUpdated) { - TC_LOG_FATAL(LOG_FILTER_GENERAL, "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry()); + TC_LOG_FATAL("misc", "Object::~Object - guid=" UI64FMTD ", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry()); ASSERT(false); sObjectAccessor->RemoveUpdateObject(this); } @@ -737,7 +737,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value) if (offset > 4) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::SetByteValue: wrong offset %u", offset); + TC_LOG_ERROR("misc", "Object::SetByteValue: wrong offset %u", offset); return; } @@ -761,7 +761,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value) if (offset > 2) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::SetUInt16Value: wrong offset %u", offset); + TC_LOG_ERROR("misc", "Object::SetUInt16Value: wrong offset %u", offset); return; } @@ -901,7 +901,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag) if (offset > 4) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::SetByteFlag: wrong offset %u", offset); + TC_LOG_ERROR("misc", "Object::SetByteFlag: wrong offset %u", offset); return; } @@ -924,7 +924,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag) if (offset > 4) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object::RemoveByteFlag: wrong offset %u", offset); + TC_LOG_ERROR("misc", "Object::RemoveByteFlag: wrong offset %u", offset); return; } @@ -991,7 +991,7 @@ void Object::ApplyModFlag64(uint16 index, uint64 flag, bool apply) bool Object::PrintIndexError(uint32 index, bool set) const { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u", (set ? "set value to" : "get value from"), index, m_valuesCount, GetTypeId(), m_objectType); + TC_LOG_ERROR("misc", "Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u", (set ? "set value to" : "get value from"), index, m_valuesCount, GetTypeId(), m_objectType); // ASSERT must fail after function call return false; @@ -1054,32 +1054,32 @@ ByteBuffer& operator<<(ByteBuffer& buf, Position::PositionXYZOStreamer const& st void MovementInfo::OutDebug() { - TC_LOG_INFO(LOG_FILTER_GENERAL, "MOVEMENT INFO"); - TC_LOG_INFO(LOG_FILTER_GENERAL, "guid " UI64FMTD, guid); - TC_LOG_INFO(LOG_FILTER_GENERAL, "flags %u", flags); - TC_LOG_INFO(LOG_FILTER_GENERAL, "flags2 %u", flags2); - TC_LOG_INFO(LOG_FILTER_GENERAL, "time %u current time " UI64FMTD "", flags2, uint64(::time(NULL))); - TC_LOG_INFO(LOG_FILTER_GENERAL, "position: `%s`", pos.ToString().c_str()); + TC_LOG_INFO("misc", "MOVEMENT INFO"); + TC_LOG_INFO("misc", "guid " UI64FMTD, guid); + TC_LOG_INFO("misc", "flags %u", flags); + TC_LOG_INFO("misc", "flags2 %u", flags2); + TC_LOG_INFO("misc", "time %u current time " UI64FMTD "", flags2, uint64(::time(NULL))); + TC_LOG_INFO("misc", "position: `%s`", pos.ToString().c_str()); if (flags & MOVEMENTFLAG_ONTRANSPORT) { - TC_LOG_INFO(LOG_FILTER_GENERAL, "TRANSPORT:"); - TC_LOG_INFO(LOG_FILTER_GENERAL, "guid: " UI64FMTD, transport.guid); - TC_LOG_INFO(LOG_FILTER_GENERAL, "position: `%s`", transport.pos.ToString().c_str()); - TC_LOG_INFO(LOG_FILTER_GENERAL, "seat: %i", transport.seat); - TC_LOG_INFO(LOG_FILTER_GENERAL, "time: %u", transport.time); + TC_LOG_INFO("misc", "TRANSPORT:"); + TC_LOG_INFO("misc", "guid: " UI64FMTD, transport.guid); + TC_LOG_INFO("misc", "position: `%s`", transport.pos.ToString().c_str()); + TC_LOG_INFO("misc", "seat: %i", transport.seat); + TC_LOG_INFO("misc", "time: %u", transport.time); if (flags2 & MOVEMENTFLAG2_INTERPOLATED_MOVEMENT) - TC_LOG_INFO(LOG_FILTER_GENERAL, "time2: %u", transport.time2); + TC_LOG_INFO("misc", "time2: %u", transport.time2); } if ((flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (flags2 & MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING)) - TC_LOG_INFO(LOG_FILTER_GENERAL, "pitch: %f", pitch); + TC_LOG_INFO("misc", "pitch: %f", pitch); - TC_LOG_INFO(LOG_FILTER_GENERAL, "fallTime: %u", fallTime); + TC_LOG_INFO("misc", "fallTime: %u", fallTime); if (flags & MOVEMENTFLAG_FALLING) - TC_LOG_INFO(LOG_FILTER_GENERAL, "j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed); + TC_LOG_INFO("misc", "j_zspeed: %f j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed); if (flags & MOVEMENTFLAG_SPLINE_ELEVATION) - TC_LOG_INFO(LOG_FILTER_GENERAL, "splineElevation: %f", splineElevation); + TC_LOG_INFO("misc", "splineElevation: %f", splineElevation); } WorldObject::WorldObject(bool isWorldObject): WorldLocation(), @@ -2096,7 +2096,7 @@ void WorldObject::SetMap(Map* map) return; if (m_currMap) { - TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId()); + TC_LOG_FATAL("misc", "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId()); ASSERT(false); } m_currMap = map; @@ -2131,7 +2131,7 @@ void WorldObject::AddObjectToRemoveList() Map* map = FindMap(); if (!map) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).", GetTypeId(), GetEntry(), GetGUIDLow(), GetMapId()); + TC_LOG_ERROR("misc", "Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).", GetTypeId(), GetEntry(), GetGUIDLow(), GetMapId()); return; } @@ -2305,7 +2305,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry); if (!goinfo) { - TC_LOG_ERROR(LOG_FILTER_SQL, "Gameobject template %u not found in database!", entry); + TC_LOG_ERROR("sql.sql", "Gameobject template %u not found in database!", entry); return NULL; } @@ -2673,7 +2673,7 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle) // Prevent invalid coordinates here, position is unchanged if (!Trinity::IsValidMapCoord(destx, desty, pos.m_positionZ)) { - TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::MovePosition: Object (TypeId: %u Entry: %u GUID: %u) has invalid coordinates X: %f and Y: %f were passed!", + TC_LOG_FATAL("misc", "WorldObject::MovePosition: Object (TypeId: %u Entry: %u GUID: %u) has invalid coordinates X: %f and Y: %f were passed!", GetTypeId(), GetEntry(), GetGUIDLow(), destx, desty); return; } @@ -2720,7 +2720,7 @@ void WorldObject::MovePositionToFirstCollision(Position &pos, float dist, float // Prevent invalid coordinates here, position is unchanged if (!Trinity::IsValidMapCoord(destx, desty)) { - TC_LOG_FATAL(LOG_FILTER_GENERAL, "WorldObject::MovePositionToFirstCollision invalid coordinates X: %f and Y: %f were passed!", destx, desty); + TC_LOG_FATAL("misc", "WorldObject::MovePositionToFirstCollision invalid coordinates X: %f and Y: %f were passed!", destx, desty); return; } diff --git a/src/server/game/Entities/Object/Updates/UpdateData.cpp b/src/server/game/Entities/Object/Updates/UpdateData.cpp index acf1e12b11b..be04a38c2d0 100644 --- a/src/server/game/Entities/Object/Updates/UpdateData.cpp +++ b/src/server/game/Entities/Object/Updates/UpdateData.cpp @@ -55,7 +55,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) int z_res = deflateInit(&c_stream, sWorld->getIntConfig(CONFIG_COMPRESSION)); if (z_res != Z_OK) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res)); + TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflateInit) Error code: %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } @@ -68,14 +68,14 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) z_res = deflate(&c_stream, Z_NO_FLUSH); if (z_res != Z_OK) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res)); + TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflate) Error code: %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } if (c_stream.avail_in != 0) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate not greedy)"); + TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflate not greedy)"); *dst_size = 0; return; } @@ -83,7 +83,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) z_res = deflate(&c_stream, Z_FINISH); if (z_res != Z_STREAM_END) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res)); + TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflate should report Z_STREAM_END instead %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } @@ -91,7 +91,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) z_res = deflateEnd(&c_stream); if (z_res != Z_OK) { - TC_LOG_ERROR(LOG_FILTER_GENERAL, "Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res)); + TC_LOG_ERROR("misc", "Can't compress update packet (zlib: deflateEnd) Error code: %i (%s)", z_res, zError(z_res)); *dst_size = 0; return; } |
