fix: Updates more logging to Serilog (#1105)

Adds more serilog logging and cleans up some server files.
This commit is contained in:
Kamron Batman 2022-07-01 11:57:08 -07:00 • committed by GitHub
parent 1cf4a43c2c
commit 38686c09b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 2261 additions and 2234 deletions

View file

@ -16,11 +16,14 @@
using System;
using System.Buffers;
using System.IO;
using Server.Logging;
namespace Server.Network;
public static class OutgoingContainerPackets
{
private static readonly ILogger logger = LogFactory.GetLogger(typeof(OutgoingContainerPackets));
public static void SendDisplaySpellbook(this NetState ns, Serial book) => ns.SendDisplayContainer(book, -1);
public static void SendSpellbookContent(this NetState ns, Serial book, int graphic, int offset, ulong content)
@ -136,7 +139,12 @@ public static class OutgoingContainerPackets
}
else
{
Console.WriteLine("Warning: ContainerContentUpdate on item with !(parent is Item)");
logger.Warning(
"ContainerContentUpdate on Item {Type} ({Serial}) where parent is not an Item",
item.GetType().Name,
item.Serial
);
parentSerial = Serial.Zero;
}