19 lines
612 B
C#
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();
|
|
}
|
|
}
|