Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting started example not working #19

Closed
cirrusone opened this issue Apr 16, 2020 · 1 comment
Closed

Getting started example not working #19

cirrusone opened this issue Apr 16, 2020 · 1 comment

Comments

@cirrusone
Copy link

cirrusone commented Apr 16, 2020

Hello,

I'm trying to re-create the example in the README.md

///Install-Package Serilog.Sinks.Map -Pre
Log.Logger = new LoggerConfiguration()
    .WriteTo.Map("Name", "Other", (name, wt) => wt.File($"./logs/log-{name}.txt"))
    .CreateLogger();

It gives error

Error CS1061 'LoggerSinkConfiguration' does not contain a definition for 'File' and no accessible extension method 'File' accepting a first argument of type 'LoggerSinkConfiguration' could be found (are you missing a using directive or an assembly reference?)

Nuget installed the following
Successfully installed 'Serilog 2.8.0' to netcore ConsoleApp
Successfully installed 'Serilog.Sinks.Map 1.0.1' to netcore ConsoleApp
Successfully installed 'System.Collections.NonGeneric 4.3.0' to netcore ConsoleApp
Executing nuget actions took 630.19 ms

How do I get this to work? The tests also do not appear to have this same example.

Update: It also requires a further dependency on Serilog.Sinks.File 4.1.0

@nblumhardt
Copy link
Member

Thanks for the update 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants