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

How to support Level control through Appsettings? #86

Closed
stephenpatten opened this issue Sep 17, 2017 · 2 comments
Closed

How to support Level control through Appsettings? #86

stephenpatten opened this issue Sep 17, 2017 · 2 comments

Comments

@stephenpatten
Copy link

Hey Nic,

Read this and
this and am looking for an answer as to whether the Seq appender level setting can to adjusted from the config file?

Application: Web API 2
Logger: Serilog

<add key="serilog:minimum-level" value="Verbose" />
<add key="serilog:using:Seq" value="Serilog.Sinks.Seq" />
<add key="serilog:write-to:Seq.serverUrl" value="removed" />
<add key="serilog:write-to:Seq.apiKey" value="removed" />

Thank you,
Stephen

@nblumhardt
Copy link
Member

Hi Stephen,

Adding:

<add key="serilog:write-to:Seq.restrictedToMinimumLevel" value="Debug" />

will limit the events going to Seq; to use the full dynamic level control feature you'll currently need to configure the sink in code (see: serilog/serilog#1020 for progress on LevelSwitch support in config).

BTW, the first link is a bit outdated, there's no Serilog.Extras.* packages any more - the README in this repo should have the most relevant info.

HTH,
Nick

@stephenpatten
Copy link
Author

stephenpatten commented Sep 18, 2017 via email

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