network: Migrate logging macros (#3575)
* network: Migrate logging macros Follow-up of #3533 Replace prefix of all logging macros from LOG to NGLOG * Remove hash in format
This commit is contained in:
parent
4bdf2e1eb9
commit
3e8e011c33
|
@ -15,12 +15,12 @@ static std::shared_ptr<Room> g_room; ///< Room (Server) for network
|
|||
|
||||
bool Init() {
|
||||
if (enet_initialize() != 0) {
|
||||
LOG_ERROR(Network, "Error initalizing ENet");
|
||||
NGLOG_ERROR(Network, "Error initalizing ENet");
|
||||
return false;
|
||||
}
|
||||
g_room = std::make_shared<Room>();
|
||||
g_room_member = std::make_shared<RoomMember>();
|
||||
LOG_DEBUG(Network, "initialized OK");
|
||||
NGLOG_DEBUG(Network, "initialized OK");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void Shutdown() {
|
|||
g_room.reset();
|
||||
}
|
||||
enet_deinitialize();
|
||||
LOG_DEBUG(Network, "shutdown OK");
|
||||
NGLOG_DEBUG(Network, "shutdown OK");
|
||||
}
|
||||
|
||||
} // namespace Network
|
||||
|
|
|
@ -408,10 +408,11 @@ void Room::RoomImpl::HandleWifiPacket(const ENetEvent* event) {
|
|||
if (member != members.end()) {
|
||||
enet_peer_send(member->peer, 0, enet_packet);
|
||||
} else {
|
||||
LOG_ERROR(Network,
|
||||
"Attempting to send to unknown MAC address: %02X:%02X:%02X:%02X:%02X:%02X",
|
||||
destination_address[0], destination_address[1], destination_address[2],
|
||||
destination_address[3], destination_address[4], destination_address[5]);
|
||||
NGLOG_ERROR(Network,
|
||||
"Attempting to send to unknown MAC address: "
|
||||
"{:02X}:{:02X}:{:02X}:{:02X}:{:02X}:{:02X}",
|
||||
destination_address[0], destination_address[1], destination_address[2],
|
||||
destination_address[3], destination_address[4], destination_address[5]);
|
||||
enet_packet_destroy(enet_packet);
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue