fix: Fixes structured logging (#1043)
- [X] Fixes various bugs in logging.
This commit is contained in:
parent
78bb4f4bb2
commit
6e69d25e33
31 changed files with 96 additions and 102 deletions
|
|
@ -103,8 +103,7 @@ public static class IncomingExtendedCommandPackets
|
|||
if (state.Mobile == null)
|
||||
{
|
||||
state.LogInfo(
|
||||
"Sent in-game packet (0xBFx{0:X2}) before having been attached to a mobile",
|
||||
packetId
|
||||
$"Sent in-game packet (0xBFx{packetId:X2}) before having been attached to a mobile"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ public static class IncomingPlayerPackets
|
|||
}
|
||||
default:
|
||||
{
|
||||
state.LogInfo("Unknown text-command type 0x{0:X2}: {1}", state, type, command);
|
||||
state.LogInfo($"Unknown text-command type 0x{state:X2}: {type} ({command})");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public static class OutgoingGumpPackets
|
|||
|
||||
if (error != ZlibError.Okay)
|
||||
{
|
||||
logger.Warning($"Gump compression failed {error}");
|
||||
logger.Warning("Gump compression failed: {Error}", error);
|
||||
|
||||
writer.Write(4);
|
||||
writer.Write(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue