You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -78,9 +78,9 @@ That's it! With the level bumped up a little you will see log output resembling:
78
78
[22:14:45.741 DBG] Handled. Status code: 304 File: /css/site.css
79
79
```
80
80
81
-
Tip: to see Serilog output in the Visual Studio output window when running under IIS, either select _ASP.NET Core Web Server_ from the _Show output from_ drop-down list, or replace `WriteTo.Console()` in the logger configuration with `WriteTo.Debug()`.
81
+
**Tip:** to see Serilog output in the Visual Studio output window when running under IIS, either select _ASP.NET Core Web Server_ from the _Show output from_ drop-down list, or replace `WriteTo.Console()` in the logger configuration with `WriteTo.Debug()`.
82
82
83
-
A more complete example, showing _appsettings.json_ configuration, can be found in [the sample project here](https://github.com/serilog/serilog-aspnetcore/tree/dev/samples/EarlyInitializationSample).
83
+
A more complete example, showing `appsettings.json` configuration, can be found in [the sample project here](https://github.com/serilog/serilog-aspnetcore/tree/dev/samples/EarlyInitializationSample).
84
84
85
85
### Request logging <sup>`3.0.0-*`</sup>
86
86
@@ -215,6 +215,16 @@ If [inline initialization](#inline-initialization) is used, providers can be ena
215
215
writeToProviders: true)
216
216
```
217
217
218
+
### JSON output
219
+
220
+
The `Console()`, `Debug()`, and `File()` sinksallsupportJSON-formattedoutputnatively, viatheincluded_Serilog.Formatting.Compact_package.
221
+
222
+
Towritenewline-delimitedJSON, passa `CompactJsonFormatter` or `RenderedCompactJsonFormatter` tothesinkconfigurationmethod:
0 commit comments