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

Reverted default value for ShutdownOnDispose to false #828

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Jul 18, 2022

Discovered that the Microsoft Host disposes the LoggerFactory on startup-exception, so any logging after that point will be lost. See also dotnet/runtime#72225 + NLog/NLog.Extensions.Logging#605

Instead it is better to explicit call NLog.LogManager.Shutdown(), so the NLog Logger is still works when logging the exception.

Reverting #691

@snakefoot snakefoot added this to the 5.1.0 milestone Jul 18, 2022
@snakefoot snakefoot enabled auto-merge (squash) July 18, 2022 18:48
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@snakefoot snakefoot merged commit ceef1f8 into NLog:master Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant