Skip to content

Allow severity-based log message filtering in PluginProcessor#4063

Merged
vy merged 3 commits intoapache:2.xfrom
treyfarmigoni:feature/add-plugin-processor-kind-filtering
Mar 17, 2026
Merged

Allow severity-based log message filtering in PluginProcessor#4063
vy merged 3 commits intoapache:2.xfrom
treyfarmigoni:feature/add-plugin-processor-kind-filtering

Conversation

@treyfarmigoni
Copy link
Contributor

Allow filtering in printMessage based on log4j.plugin.processor.minAllowedMessageKind

Issue details discussed here
#3380 (reply in thread)

Add an log4j.plugin.processor.minAllowedMessageKind argument to PluginProcessor and use it to filter printMessage() calls based on the provided Diagnostic.Kind
Document the issue and the property in Registering plugins in a %collapsible

Checklist

  • Base your changes on 2.x branch if you are targeting Log4j 2; use main otherwise
  • ./mvnw verify succeeds (the build instructions)
  • Non-trivial changes contain an entry file in the src/changelog/.2.x.x directory
  • Tests are provided

@treyfarmigoni treyfarmigoni force-pushed the feature/add-plugin-processor-kind-filtering branch from b893c7c to cff6451 Compare March 9, 2026 22:12
@treyfarmigoni treyfarmigoni marked this pull request as ready for review March 9, 2026 22:13
@treyfarmigoni
Copy link
Contributor Author

mvn verify passing
Screenshot 2026-03-09 at 5 08 22 PM

@vy vy self-assigned this Mar 16, 2026
@vy vy added enhancement Additions or updates to features plugins Affects the plugin system labels Mar 16, 2026
Copy link
Member

@vy vy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@treyfarmigoni, it is very rare we encounter PRs as complete as yours. Thanks so much for your due diligence. 💯

I've dropped some minor remarks, but I see no showstoppers.

@vy
Copy link
Member

vy commented Mar 17, 2026

@treyfarmigoni, would you mind pulling in the changes from 2.x, please? There are conflicts.

@treyfarmigoni
Copy link
Contributor Author

@vy - Conflicts should now be resolved. Thank you!

@vy vy changed the title Allow Plugin Processing Kind filtering Allow severity-based log message filtering in PluginProcessor Mar 17, 2026
@vy vy added this to the 2.26.0 milestone Mar 17, 2026
@vy vy enabled auto-merge (squash) March 17, 2026 19:41
@vy vy merged commit 1fdfe14 into apache:2.x Mar 17, 2026
5 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Log4j pull request tracker Mar 17, 2026
@github-actions
Copy link

Job Requested goals Build Tool Version Build Outcome Build Scan®
build-macos-latest clean install 3.9.8 Build Scan PUBLISHED
build-ubuntu-latest clean install 3.9.8 Build Scan PUBLISHED
build-windows-latest clean install 3.9.8 Build Scan PUBLISHED
Generated by gradle/develocity-actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Additions or updates to features plugins Affects the plugin system

Projects

Development

Successfully merging this pull request may close these issues.

2 participants