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

@ -861,7 +861,7 @@ namespace Server
{
if (m_Spell != null && value != null)
{
Console.WriteLine("Warning: Spell has been overwritten");
logger.Warning("Spell has been overwritten.");
}
m_Spell = value;
@ -5087,13 +5087,15 @@ namespace Server
{
item = oldItem.GetType().CreateInstance<T>();
}
catch
catch (Exception e)
{
Console.WriteLine(
"Warning: {0}: Item must have a zero parameter constructor to be separated from a stack. '{1}'.",
logger.Warning(
e,
"[{Serial} {Name}]: Item must have a zero parameter constructor to be separated from a stack.",
oldItem.Serial,
oldItem.GetType().Name
);
return null;
}
@ -7685,9 +7687,7 @@ namespace Server
if (m_DeltaQueue.Count > 0)
{
Utility.PushColor(ConsoleColor.DarkYellow);
Console.WriteLine("Warning: {0} mobiles left in delta queue after processing.", m_DeltaQueue.Count);
Utility.PopColor();
logger.Warning("{Count} mobiles left in delta queue after processing.", m_DeltaQueue.Count);
}
}