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
about: Report a bug and help us to improve Serilog
4
+
title: ''
5
+
labels: bug
6
+
assignees: ''
7
+
8
+
---
9
+
10
+
The Serilog maintainers want you to have a great experience using Serilog, and will happily track down and resolve bugs. We all have limited time, though, so please think through all of the factors that might be involved and include as much useful information as possible 😊.
11
+
12
+
ℹ If the problem is caused by a sink or other related package, please try to track down the correct repository for that package and create the report there: this tracker is for the **Serilog.AspNetCore** package only.
13
+
14
+
**Description**
15
+
What's going wrong?
16
+
17
+
**Reproduction**
18
+
Please provide code samples showing how you're configuring and calling Serilog to produce the behavior.
19
+
20
+
**Expected behavior**
21
+
A concise description of what you expected to happen.
22
+
23
+
**Relevant package, tooling and runtime versions**
24
+
What Serilog version are you using, on what platform?
The Serilog community wants you to have a great experience using Serilog. Unfortunately, only a handful of maintainers actively follow this repository, and our time is short, so we cannot answer usage questions posted here.
13
+
14
+
Fortunately, a much larger group of people (including some of us) also watch and answer questions on the [`serilog` tag on Stack Overflow](https://stackoverflow.com/questions/tagged/serilog).
15
+
16
+
Please head over to Stack Overflow, ask your question, and tag it with `serilog`. Thanks! ❤
**Finally**, clean up by removing the remaining configuration for the default logger:
60
63
61
-
* Remove calls to `AddLogging()`
62
64
* Remove the `"Logging"` section from _appsettings.json_ files (this can be replaced with [Serilog configuration](https://github.com/serilog/serilog-settings-configuration) as shown in [the _EarlyInitializationSample_ project](https://github.com/serilog/serilog-aspnetcore/blob/dev/samples/EarlyInitializationSample/Program.cs), if required)
63
-
* Remove `ILoggerFactory` parameters and any `Add*()` calls on the logger factory in _Startup.cs_
64
65
* Remove `UseApplicationInsights()` (this can be replaced with the [Serilog AI sink](https://github.com/serilog/serilog-sinks-applicationinsights), if required)
65
66
66
67
That's it! With the level bumped up a little you will see log output resembling:
Thishastheadvantageofmakingthe `hostingContext`'s `Configuration` object available for [configuration of the logger](https://github.com/serilog/serilog-settings-configuration), but at the expense of losing `Exception`s raised earlier in program startup.
201
+
Thishastheadvantageofmakingaserviceproviderandthe `hostingContext`'s `Configuration` object available for [configuration of the logger](https://github.com/serilog/serilog-settings-configuration), but at the expense of losing `Exception`s raised earlier in program startup.
0 commit comments