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

Ensure no logs are dropped #2678

Open
Tracked by #2091
fm-117 opened this issue Nov 18, 2024 · 0 comments
Open
Tracked by #2091

Ensure no logs are dropped #2678

fm-117 opened this issue Nov 18, 2024 · 0 comments
Assignees

Comments

@fm-117
Copy link
Contributor

fm-117 commented Nov 18, 2024

As seen in our builds, some logs seem to be dropped while the application, and consequently the LoggingSystem, is exiting.

To fix that:

  • in LoggerThread.AddWork: add logging action only when _stop flag is false and throw an exception when it is true
    • This should be fine with our current use as we never had a failure on the Debug.Assert(!_stop);
  • in LoggerThread.Stop: at the end check whether the queue is empty or not. If some logging actions are still pending, use current thread to perform them
@fm-117 fm-117 self-assigned this Nov 18, 2024
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

No branches or pull requests

1 participant