Samples are broken out of the box
See original GitHub issueI copied the Sample out of the box virtually verbatim, substituting netcoreapp3.1
for the multiple targets and a true package reference for the project reference. I got the following exception.
What am I missing here?
System.ArgumentException
HResult=0x80070057
Message=Configuration for Action<Serilog.Configuration.LoggerEnrichmentConfiguration> is not implemented.
Source=Serilog.Settings.Configuration
StackTrace:
at Serilog.Settings.Configuration.ObjectArgumentValue.ConvertTo(Type toType, ResolutionContext resolutionContext)
at Serilog.Settings.Configuration.ConfigurationReader.<>c__DisplayClass18_2.<CallConfigurationMethods>b__3(<>f__AnonymousType9`2 <>h__TransparentIdentifier0)
at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
at System.Linq.Enumerable.SelectListPartitionIterator`2.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Serilog.Settings.Configuration.ConfigurationReader.CallConfigurationMethods(ILookup`2 methods, IList`1 configurationMethods, Object receiver)
at Serilog.Settings.Configuration.ConfigurationReader.ApplyEnrichment(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)
at Serilog.ConfigurationLoggerConfigurationExtensions.Configuration(LoggerSettingsConfiguration settingConfiguration, IConfiguration configuration, DependencyContext dependencyContext)
at Sample.Program.Main(String[] args) in \path\to\Sample\Program.cs:line 25
With the .csproj
:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.Sinks.Async" Version="1.4" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1" />
<PackageReference Include="Serilog.Enrichers.Environment" Version="2.1.3" />
<PackageReference Include="Serilog.Enrichers.Process" Version="2.0.1" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1" />
<PackageReference Include="Serilog.Filters.Expressions" Version="2.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.0.1" />
</ItemGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Got my Macy's Box with the sample size broken! Anyone ...
The one time I reached out to them (over one product issue in my box), they sent me a new one plus a...
Read more >The end of broken sample containers? - Mark Brennan
We've received your samples but half of them are broken and we can't ... Take a look at the video demonstration of the...
Read more >What to Do When You Have a Haemolysed Blood Sample
A haemolysed blood sample is when the red blood cells in the sample you provided have burst or broken down. This process is...
Read more >Section 1.4: Other Effective Sampling Methods
In essence, we use cluster sampling when our population is already broken up into groups (clusters), and each cluster represents the population. That...
Read more >A Complete Guide to Box Plots
Box plots are a streamlined way of summarizing the distribution of groups of data. Read this article to learn how to best use...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @mwpowellhtx ,
If you use
v3.1
try get the sample from themaster
branch: https://github.com/serilog/serilog-settings-configuration/blob/master/sample/Sample/appsettings.jsonThe sample from the
dev
branch requires pre-release version of the package (3.2.0-dev-*
)@mwpowellhtx It should be stable enough. Would be great if you try the
dev
releases.