Improve Logging

This commit is contained in:
Hexafluorine
2025-05-16 16:40:53 -07:00
parent 27c8a06a4f
commit 4432406caa
7 changed files with 38 additions and 17 deletions

View File

@@ -14,6 +14,8 @@ using Campofinale.Game.Spaceship;
using Campofinale.Game.Dungeons;
using Campofinale.Game.Factory;
using Campofinale.Game.Mission;
using Pastel;
using System.Drawing;
namespace Campofinale
@@ -504,8 +506,9 @@ namespace Campofinale
if (Server.config.logOptions.packets && !Server.csMessageToHide.Contains((CsMsgId)packet.csHead.Msgid))
{
Logger.Print("CmdId: " + (CsMsgId)packet.csHead.Msgid);
Logger.Print(BitConverter.ToString(packet.finishedBody).Replace("-", string.Empty).ToLower());
Logger.Print("Recieved Packet: " + ((CsMsgId)packet.csHead.Msgid).ToString().Pastel(Color.LightCyan) + $" Id: {packet.csHead.Msgid} with {packet.finishedBody.Length} Bytes");
if (Server.config.logOptions.packetBodies)
Logger.Print(BitConverter.ToString(packet.finishedBody).Replace("-", string.Empty).ToLower());
}
try