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

[BUG] Elastic.Extensions.Logging stops logging after configuration refresh events #395

Closed
moikmellah opened this issue May 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@moikmellah
Copy link
Contributor

ECS integration/library project(s) (e.g. Elastic.CommonSchema.Serilog): Elastic.Extensions.Logging v8.11.0

ECS schema version (e.g. 1.4.0): latest

ECS .NET assembly version (e.g. 1.4.2): latest

.NET framework / OS: .NET 8.0, .NET Framework 4.7.2

Description of the problem, including expected versus actual behavior: On configuration refresh events, Elastic logging halts entirely while other sinks continue logging correctly. Expected: Logging should continue after configuration refresh events.

Steps to reproduce:

  1. Configure any .NET application with Elastic.Extensions.Logging as a provider
  2. Add a JSON file to configuration with file watching enabled
  3. Update the JSON file while the app is running to trigger an OptionsMonitor.OnReload event
  4. Log events are no longer sent from the Elastic provider (other providers still work, though)
@moikmellah moikmellah added the bug Something isn't working label May 30, 2024
@moikmellah
Copy link
Contributor Author

moikmellah commented May 30, 2024

Pretty sure it's because _channel is being disposed of when configs are refreshed, but nothing is propagating the new _channel to any loggers which have already been created. PR #396 submitted for a possible fix.

**Edit: Sorry, had to redo the PR to comply with the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants