Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Dispose hosting engine services once the application is shutting down #322

Closed
kichalla opened this issue Aug 10, 2015 · 3 comments
Closed
Assignees
Milestone

Comments

@kichalla
Copy link
Member

Scenario: LoggerFactory needs to be disposed once the application shutdown so that dispose can be called on all the registered logger providers. This is so that these logger providers can flush any data that they might be holding.

@Tratcher @HaoK
The proposal is to create a DI scope for hosting engine services which get disposed once the hosting engine is being disposed.

@HaoK
Copy link
Member

HaoK commented Aug 10, 2015

Is there anything other than the logger that is going to be disposed as part of this scope cleanup? If not is it really worth creating a scope to dispose one service?

@davidfowl
Copy link
Member

+1 to @HaoK's comment. Why would we create a scope just to dispose the ILoggerFactory.

@dougbu
Copy link
Member

dougbu commented Sep 1, 2015

@Tratcher and I suspect aspnet/Mvc#3066 is related. Could fix that one in other ways but could also piggy-back on a solution here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants