-
Notifications
You must be signed in to change notification settings - Fork 11
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
Mention MinimumLevel.Debug in README re #17 #18
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ Then enable the sink using `WriteTo.Debug()`: | |
```csharp | ||
Log.Logger = new LoggerConfiguration() | ||
.WriteTo.Debug() | ||
.MinimumLevel.Debug() | ||
.CreateLogger(); | ||
|
||
Log.Information("Hello, world!"); | ||
|
@@ -24,6 +25,10 @@ Log events will be printed to the debug output: | |
|
||
![Debug Output](https://raw.githubusercontent.com/serilog/serilog-sinks-debug/dev/assets/Screenshot.png) | ||
|
||
The chaining of the `MinimumLevel.Debug()` call is required in order to log events of level `LogEventLevel.Debug`, as the default minimum level for a new `LoggerConfiguration` is `LogEventLevel.Information`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps instead of this, if we got a screenshot that did not include Debug output? Or linked: https://github.com/serilog/serilog/wiki/Configuration-Basics#minimum-level with a message like
|
||
|
||
Note that if the chaining of this call is omitted, only events of `LogEventLevel.Information` and above will be logged. | ||
|
||
### XML `<appSettings>` configuration | ||
|
||
To use the sink with the [Serilog.Settings.AppSettings](https://github.com/serilog/serilog-settings-appsettings) package, first install that package if you haven't already done so: | ||
|
@@ -47,6 +52,7 @@ In your application's `App.config` or `Web.config` file, specify the console sin | |
<appSettings> | ||
<add key="serilog:using:Debug" value="Serilog.Sinks.Debug" /> | ||
<add key="serilog:write-to:Debug" /> | ||
<add key="serilog:minimum-level" value="Debug" /> | ||
``` | ||
|
||
### JSON `appsettings.json` configuration | ||
|
@@ -74,7 +80,8 @@ In your `appsettings.json` file, under the `Serilog` node, : | |
```json | ||
{ | ||
"Serilog": { | ||
"WriteTo": ["Debug"] | ||
"WriteTo": ["Debug"], | ||
"MinimumLevel": "Debug" | ||
} | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have been looking at the serilog readme, and the
MinimumLevel
is not mentioned there either.Space in there is at a premium, so even though it might trip quite a few people up, there's a very high bar for making the readme longer.
Also conflicted about whether I'd put this line here as it might suggest to people some linkage between this Sink being called Debug and the min level being Debug ?