using System;
using System.Text;
using Serilog;
using Serilog.Sinks.SystemConsole.Themes;
using Serilog.Formatting.Compact;
using Google.Protobuf;
public class Program
{
public static void Main()
Console.WriteLine("Text:");
LogText();
Console.WriteLine("\nJson:");
LogJson();
}
private static void LogText()
Log.Logger = new LoggerConfiguration()
.WriteTo.Console(theme: ConsoleTheme.None)
.CreateLogger();
var uid = new CharacterUid("MyCharacter", "MyUser");
Log.Information("{CharacterUid} joined ", uid);
Log.Information("{@CharacterUid} joined ", uid);
Log.CloseAndFlush();
private static void LogJson()
.WriteTo.Console(new CompactJsonFormatter())
public record CharacterUid(string CharacterId, string OwnerId){
override public string ToString() => $"{OwnerId}-{CharacterId}";
Operation failed. Please try again or report this to support.