public static ILogger Create() { var log = new LoggerConfiguration() .Enrich.WithProcessId() .Enrich.WithThreadId() .WriteTo.Seq("http://localhost:5341") .MinimumLevel.Debug() .CreateLogger(); var logger = new SerilogLogger(log); return logger; }
private static ILogger CreateLogger() { var log = new LoggerConfiguration() .Enrich.WithProcessId() .Enrich.WithThreadId() .Enrich.With<TestIdEnricher>() .Enrich.With<TestNameEnricher>() .Enrich.With<NimbusMessageEnricher>() .Enrich.WithExceptionDetails() .WriteTo.Seq("http://localhost:5341") .Chain(l => { if (Debugger.IsAttached) l.WriteTo.Trace(); }) .MinimumLevel.Verbose() .CreateLogger(); Log.Logger = log; var logger = new SerilogLogger(log); return logger; }