mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-04 00:31:55 +02:00
added nlog logging (todo: custom logger for packets)
This commit is contained in:
parent
c5516511b0
commit
ed0a0a58f7
36 changed files with 5430 additions and 310 deletions
|
@ -336,7 +336,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
#if DEBUG
|
||||
Console.BackgroundColor = ConsoleColor.DarkYellow;
|
||||
|
||||
Program.Log.Debug(String.Format("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
Program.Log.Debug("IsAuth: {0} Size: 0x{1:X}, NumSubpackets: {2}{3}{4}", header.isAuthenticated, header.packetSize, header.numSubpackets, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()));
|
||||
|
||||
foreach (SubPacket sub in getSubpackets())
|
||||
{
|
||||
|
|
|
@ -140,20 +140,14 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||
public void debugPrintSubPacket()
|
||||
{
|
||||
#if DEBUG
|
||||
Console.BackgroundColor = ConsoleColor.DarkRed;
|
||||
|
||||
Program.Log.Debug(String.Format("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes())));
|
||||
Program.Log.Debug("Size: 0x{0:X}{1}{2}", header.subpacketSize, Environment.NewLine, Utils.ByteArrayToHex(getHeaderBytes()));
|
||||
|
||||
if (header.type == 0x03)
|
||||
{
|
||||
Program.Log.Debug(String.Format("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE)));
|
||||
Program.Log.Debug("Opcode: 0x{0:X}{1}{2}", gameMessage.opcode, Environment.NewLine, Utils.ByteArrayToHex(getGameMessageBytes(), SUBPACKET_SIZE));
|
||||
}
|
||||
|
||||
Console.BackgroundColor = ConsoleColor.DarkMagenta;
|
||||
|
||||
Program.Log.Debug(String.Format("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE)));
|
||||
|
||||
Console.BackgroundColor = ConsoleColor.Black;
|
||||
Program.Log.Debug("Data: {0}{1}", Environment.NewLine, Utils.ByteArrayToHex(data, SUBPACKET_SIZE + GAMEMESSAGE_SIZE));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue