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

Async void Emit - logs sometimes are not send #51

Closed
robosek opened this issue Nov 27, 2019 · 1 comment · Fixed by #52
Closed

Async void Emit - logs sometimes are not send #51

robosek opened this issue Nov 27, 2019 · 1 comment · Fixed by #52

Comments

@robosek
Copy link
Contributor

robosek commented Nov 27, 2019

Hello!

I experienced some issues with sending logs in my test project. It's just simple console project and last line of code is responsible for sending logs. In most cases logs are not send. I was very confused first time so I investigated sink code and I found this. I think it's because of async void Emit which is basically fire and forget method. According to my knowledge async void is construction designed only for event handlers and in others cases may be not stable. IMHO it should be just void method and logs should be send synchronously but correct me if I'm wrong.

Here are some references:

  1. Link
  2. Link

I'm happy to help and do some PR but first I want to know your opinion 😄

BTW Thanks for great sink! It's fantastic to use composition of graylog and serilog and it's thanks to your work!

@whir1
Copy link
Contributor

whir1 commented Dec 2, 2019

Маке PR ^^

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

Successfully merging a pull request may close this issue.

2 participants