mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 11:42:22 +08:00
Add TextFormatter
This commit is contained in:
parent
1396de8f44
commit
3d70ce6c09
|
@ -15,6 +15,7 @@ using Serilog;
|
||||||
using Serilog.Core;
|
using Serilog.Core;
|
||||||
using Serilog.Exceptions;
|
using Serilog.Exceptions;
|
||||||
using Serilog.Formatting.Compact;
|
using Serilog.Formatting.Compact;
|
||||||
|
using Serilog.Formatting.Display;
|
||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
namespace BililiveRecorder.WPF
|
namespace BililiveRecorder.WPF
|
||||||
|
@ -181,6 +182,8 @@ namespace BililiveRecorder.WPF
|
||||||
o.DisableTaskUnobservedTaskExceptionCapture();
|
o.DisableTaskUnobservedTaskExceptionCapture();
|
||||||
o.AddExceptionFilterForType<System.Net.Http.HttpRequestException>();
|
o.AddExceptionFilterForType<System.Net.Http.HttpRequestException>();
|
||||||
|
|
||||||
|
o.TextFormatter = new MessageTemplateTextFormatter("[{RoomId}] {Message}{NewLine}{Exception}{@ExceptionDetail:j}");
|
||||||
|
|
||||||
o.MinimumBreadcrumbLevel = Serilog.Events.LogEventLevel.Debug;
|
o.MinimumBreadcrumbLevel = Serilog.Events.LogEventLevel.Debug;
|
||||||
o.MinimumEventLevel = Serilog.Events.LogEventLevel.Error;
|
o.MinimumEventLevel = Serilog.Events.LogEventLevel.Error;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user