feat(Logging): support rule fitler#38
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds rule-based filtering support to Longbow.Logging’s FileLoggerProvider by integrating LoggerFilterOptions rules into the provider’s filtering pipeline, alongside a few internal refactors and solution maintenance updates.
Changes:
- Integrate
LoggerFilterOptionsrule evaluation intoFileLoggerProviderand reload filtering behavior on options changes. - Refactor some internal logging components (dispose pattern cleanup, primary-constructor usage) and rename private fields for consistency.
- Bump
Longbow.Loggingpackage version and add the benchmarks project to the solution.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Longbow.Logging/Longbow.Logging.csproj | Bumps package version to 10.0.1. |
| src/Longbow.Logging/FileLogger/FileLoggerWriter.cs | Refactors internal flush/dispose state handling and field naming. |
| src/Longbow.Logging/FileLogger/FileLoggerProvider.cs | Adds rule-based filtering via LoggerFilterOptions + reload token; updates constructor signature. |
| src/Longbow.Logging/FileLogger/FileLogger.cs | Simplifies callback storage by using primary-constructor parameter directly. |
| src/Longbow.Logging/DBLogger/DBLoggerProvider.cs | Simplifies implementation by using primary-constructor parameters directly. |
| src/Longbow.Logging/DBLogger/DBLogger.cs | Simplifies implementation and removes commented/dead code paths. |
| Longbow.Utility2026.slnx | Adds benchmarks project under /tools/ solution folder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+49
to
+55
| /// <param name="loggerFilterOptionsMonitor"></param> | ||
| public FileLoggerProvider(IOptionsMonitor<FileLoggerOptions> optionsMonitor, IConfiguration configuration, IOptionsMonitor<LoggerFilterOptions> loggerFilterOptionsMonitor) | ||
| : this(optionsMonitor.CurrentValue) | ||
| { | ||
| _config = configuration; | ||
| UpdateFilter(loggerFilterOptionsMonitor.CurrentValue); | ||
|
|
|
|
||
| <PropertyGroup> | ||
| <Version>10.0.0</Version> | ||
| <Version>10.0.1</Version> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link issues
fixes #37
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge