From 08bf37c38dbafc1f44d234ca7bb552b107e8d3b0 Mon Sep 17 00:00:00 2001 From: Thomas Ardal Date: Wed, 20 Nov 2024 09:22:54 +0100 Subject: [PATCH] Include properties in logger (when creating the installation) --- src/Serilog.Sinks.ElmahIo/Sinks/ElmahIo/ElmahIOSink.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Serilog.Sinks.ElmahIo/Sinks/ElmahIo/ElmahIOSink.cs b/src/Serilog.Sinks.ElmahIo/Sinks/ElmahIo/ElmahIOSink.cs index 169c6f9..2c311a9 100644 --- a/src/Serilog.Sinks.ElmahIo/Sinks/ElmahIo/ElmahIOSink.cs +++ b/src/Serilog.Sinks.ElmahIo/Sinks/ElmahIo/ElmahIOSink.cs @@ -376,7 +376,14 @@ internal void CreateInstallation() var logger = new LoggerInfo { Type = "Serilog.Sinks.ElmahIo", - Properties = [], + Properties = + [ + new Item("FormatProvider", _options.FormatProvider?.GetType().FullName ?? ""), + new Item("BatchPostingLimit", _options.BatchPostingLimit.ToString()), + new Item("LevelSwitch", _options.LevelSwitch?.ToString() ?? ""), + new Item("MinimumLogEventLevel", _options.MinimumLogEventLevel?.ToString() ?? ""), + new Item("Period", _options.Period.ToString()), + ], ConfigFiles = [], Assemblies = [