fix: Updates more logging to Serilog (#1105)
Adds more serilog logging and cleans up some server files.
This commit is contained in:
parent
1cf4a43c2c
commit
38686c09b2
30 changed files with 2261 additions and 2234 deletions
|
|
@ -17,21 +17,20 @@ using System;
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Server.Json
|
||||
{
|
||||
public class ClientVersionConverter : JsonConverter<ClientVersion>
|
||||
{
|
||||
public override ClientVersion Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.String)
|
||||
{
|
||||
return new ClientVersion(reader.GetString());
|
||||
}
|
||||
namespace Server.Json;
|
||||
|
||||
throw new JsonException("Value must be a string");
|
||||
public class ClientVersionConverter : JsonConverter<ClientVersion>
|
||||
{
|
||||
public override ClientVersion Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
if (reader.TokenType == JsonTokenType.String)
|
||||
{
|
||||
return new ClientVersion(reader.GetString());
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, ClientVersion value, JsonSerializerOptions options) =>
|
||||
writer.WriteStringValue(value.ToString());
|
||||
throw new JsonException("Value must be a string");
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, ClientVersion value, JsonSerializerOptions options) =>
|
||||
writer.WriteStringValue(value.ToString());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue