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

Should I call Shutdown on each logger instance? #22

Closed
chester89 opened this issue Feb 13, 2019 · 3 comments
Closed

Should I call Shutdown on each logger instance? #22

chester89 opened this issue Feb 13, 2019 · 3 comments

Comments

@chester89
Copy link

@chester89 chester89 commented Feb 13, 2019

Hello.
I'm using log4net loggly in several projects and recently noticed that not all of my messages show up on the dashboard (the last few of them weren't there). I waited a long time and there's no sign of them, so it's unlikely to be a service issue.
I found in the docs I should call logger.Logger.Repository.Shutdown(); before exiting the application. I use separate logger instance for each of my classes. Should I call Shutdown only once for the entire app or for each of those separate logger instances?

I use 7.2.3 for the moment.

@chester89
Copy link
Author

@chester89 chester89 commented Feb 22, 2019

@Katulus
Copy link

@Katulus Katulus commented Feb 22, 2019

Hi @chester89,
logger.Logger.Repository.Shutdown(); should properly shutdown everything so it's enough to call it just once. But the shutdown for log4net-loggly works properly only in latest 9.0.0-beta1 so make sure you use that.

@chester89
Copy link
Author

@chester89 chester89 commented Feb 22, 2019

I see. Calling Shutdown() once for the whole app solved my problems on 7.x, but I'll upgrade in near future. Thanks.

@chester89 chester89 closed this Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.