feat(logging): Adds support for Serilog (#573)
Example:
```cs
public class SomeClass
{
private static ILogger _logger;
private static Logger => _logger ??= LogFactory.GetLogger(typeof(SomeClass));
...
}
```
This commit is contained in:
parent
5e1ec5416d
commit
3a619e0103
29 changed files with 347 additions and 176 deletions
|
|
@ -89,11 +89,11 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
ns.WriteConsole($"ConnectUO (v{version}) is requesting stats.");
|
||||
ns.LogInfo($"ConnectUO (v{version}) is requesting stats.");
|
||||
if (version > ConnectUOProtocolVersion)
|
||||
{
|
||||
Utility.PushColor(ConsoleColor.Yellow);
|
||||
ns.WriteConsole("Warning! ConnectUO (v{version}) is newer than what is supported.");
|
||||
ns.LogInfo("Warning! ConnectUO (v{version}) is newer than what is supported.");
|
||||
Utility.PopColor();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace Server.Network
|
|||
|
||||
if (ph.Ingame && state.Mobile == null)
|
||||
{
|
||||
state.WriteConsole("Sent in-game packet (0x{0:X2}x{1:X2}) before having been attached to a mobile", packetId, cmd);
|
||||
state.LogInfo("Sent in-game packet (0x{0:X2}x{1:X2}) before having been attached to a mobile", packetId, cmd);
|
||||
state.Disconnect("Sent in-game packet before being attached to a mobile.");
|
||||
}
|
||||
else if (ph.Ingame && state.Mobile.Deleted)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue