poe2-bot/src/Poe2Trade.Core/Logging.cs
2026-02-15 16:10:59 -05:00

19 lines
612 B
C#

using Serilog;
using Serilog.Events;
namespace Poe2Trade.Core;
public static class Logging
{
public static void Setup()
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.WriteTo.Console(
outputTemplate: "[{Timestamp:HH:mm:ss.fff} {Level:u3}] {Message:lj}{NewLine}{Exception}")
.WriteTo.File("logs/poe2trade-.log",
rollingInterval: RollingInterval.Day,
outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} [{Level:u3}] {Message:lj}{NewLine}{Exception}")
.CreateLogger();
}
}