set console to encoding utf8

This commit is contained in:
CWX
2025-04-19 11:59:04 +01:00
parent 9ff8004d89
commit 546b02779c
@@ -1,3 +1,4 @@
using System.Text;
using Serilog.Events;
using Serilog.Formatting;
@@ -7,6 +8,7 @@ public abstract class AbstractFormatter : ITextFormatter
{
public void Format(LogEvent logEvent, TextWriter output)
{
Console.OutputEncoding = Encoding.UTF8;
var newLine = Environment.NewLine;
var timestamp = logEvent.Timestamp.ToString("HH:mm:ss.fff");
var logLevel = logEvent.Level.ToString().ToUpper().Substring(0, 4);