Closed alastor09 closed 1 year ago
Thanks for the note @alastor09.
Adding a dependency on Serilog.Sinks.PeriodicBatching v3.1.0 will resolve this, until #186 is merged (which we'll do shortly).
I run into the same issue just with another Sink (AwsCloudWatch), explicitly adding Serilog.Sinks.PeriodicBatching resolves it indeed.
This was the call stack that i got when i created the logger:
Could not load type 'Serilog.Sinks.AwsCloudWatch.CloudWatchLogSink' from assembly 'Serilog.Sinks.AwsCloudWatch, Version=4.0.171.0, Culture=neutral, PublicKeyToken=23b095b16108dcf5' because the parent type is sealed.
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at System.Reflection.Assembly.get_ExportedTypes()
at Serilog.Settings.Configuration.ConfigurationReader.<>c.<FindConfigurationExtensionMethods>b__32_1(Assembly a)
at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Serilog.Settings.Configuration.ConfigurationReader.FindConfigurationExtensionMethods(IReadOnlyCollection`1 configurationAssemblies, Type configType)
at Serilog.Settings.Configuration.ConfigurationReader.FindSinkConfigurationMethods(IReadOnlyCollection`1 configurationAssemblies)
at Serilog.Settings.Configuration.ConfigurationReader.ApplySinks(LoggerConfiguration loggerConfiguration)
at Serilog.Settings.Configuration.ConfigurationReader.Configure(LoggerConfiguration loggerConfiguration)
at Serilog.Configuration.LoggerSettingsConfiguration.Settings(ILoggerSettings settings)
at Serilog.ConfigurationLoggerConfigurationExtensions.Configuration(LoggerSettingsConfiguration settingConfiguration, IConfiguration configuration, String sectionName, DependencyContext dependencyContext)
Thanks @JochemE .
v5.2.1 is out now, and fixes this: https://github.com/datalust/serilog-sinks-seq/releases/tag/v5.2.1
🎉
It looks like NuGet.org is taking longer than usual to index the package - hopefully it pops up soon, I'll keep an eye on it.
I see it on nuget and our CI build is green 💚
When updating from 5.1.1 to 5.2.0 i started getting this exception.