-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Removed @PluginAttribute 'patternFlags' argument from @PluginFactory for RegexFilter. (#3086) #3463
Conversation
@Deprecated | ||
// TODO Consider refactoring to use AbstractFilter.AbstractFilterBuilder | ||
public static RegexFilter createFilter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever we need to modify a factory method, we usually create a Builder
class instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ppkarwasz I significantly reworked this one - please review if OK
I reworked it so that all config parameters are accessible via getters (i.e. 'regex') - this sort of comes from my own prroblems with these classes where config parameters are not accessible later making it impossible to see how the element was configured (i.e. to recreate config at runtime). If this is OK I would probably make some new tickets to do the same for some other configuration items.
This PR introduces improvements to `HttpAppender` and adds a new test class, `HttpAppenderBuilderTest`, to enhance test coverage. The changes include: * Updating `HttpAppender` to improve validating behavior. * Adding HttpAppenderBuilderTest.java to verify the builder logic for HttpAppender. Ensuring that missing configurations (e.g., URL, Layout) correctly log errors. Co-authored-by: Piotr P. Karwasz <[email protected]>
+ made AbstractFiltter.AbstractFilterBuilder onMatch/onMismatch fields protected + added AbstractFilter(AbstractFilterBuilder) constructor + added RegexFilter.Builder implementation + added RegexFilter(Builder) constructor + moved RegexFilter Pattern compile into constructor + added fields to persist configuration propertties + getters (regexExpression, patternFlags) + changed private constructor to accept builder as argument + renamed private method 'targetMessageTest' to more approprriate 'getMessageTextByType' + added Javadoc + grouped deprecations
* Publish build scans to develocity.apache.org * Use `DEVELOCITY_ACCESS_KEY` to authenticate to `develocity.apache.org`
…j-parent (apache#3452) * Bump org.apache.logging:logging-parent in /log4j-parent Bumps [org.apache.logging:logging-parent](https://github.com/apache/logging-parent) from 11.3.0 to 12.0.0. - [Release notes](https://github.com/apache/logging-parent/releases) - [Commits](apache/logging-parent@rel/11.3.0...rel/12.0.0) --- updated-dependencies: - dependency-name: org.apache.logging:logging-parent dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Necessary fixes for `12.0.0` upgrade. Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Piotr P. Karwasz <[email protected]>
This PR starts a separate `verify-reproducibility` job, whenever a snapshot or release is deployed.
This PR starts an `integration-test` job, whenever a snapshot or release is deployed.
Adds a `.logging-parent-bom-activator` file to activate the `bom` profile.
Fixes the formatting of the single `s` pattern. Co-authored-by: Volkan Yazıcı <[email protected]>
Bumps commons-logging:commons-logging from 1.3.4 to 1.3.5. --- updated-dependencies: - dependency-name: commons-logging:commons-logging dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…r` (apache#3467) Co-authored-by: Josh Smith <[email protected]>
* Fixed TypeConverters#LevelConverter javadoc (apache#3359) * Moved changelog to .2.x.x per PR Code Review (apache#3359) --------- Co-authored-by: Jeff Thomas <[email protected]>
* Fixed AbstractFilterable#isFiltered javadoc (apache#3300) * Moved changelog to .2.x.x per PR Code Review (apache#3300) * Fixed AbstractFilterable#isFiltered javadoc (apache#3300) * Moved changelog to .2.x.x per PR Code Review (apache#3300) --------- Co-authored-by: Jeff Thomas <[email protected]>
+ made AbstractFiltter.AbstractFilterBuilder onMatch/onMismatch fields protected + added AbstractFilter(AbstractFilterBuilder) constructor + added RegexFilter.Builder implementation + added RegexFilter(Builder) constructor + moved RegexFilter Pattern compile into constructor + added fields to persist configuration propertties + getters (regexExpression, patternFlags) + changed private constructor to accept builder as argument + renamed private method 'targetMessageTest' to more approprriate 'getMessageTextByType' + added Javadoc + grouped deprecations
+ added validation checks to RegexFilter + added JVerify nullability annotations to RegexFilter + updated javadoc + replaced deprecated usages of CompositeFilter#getFilters with CompositeFilter#getFiltersArray in AbstractFilterableTest
Problems rebasing this PR on 2.x branch - recreated new PR #3512 - closing this one. |
(#3086)
Removed @PluginAttribute 'patternFlags' argument from @pluginfactory for RegexFilter.
Actually created new @pluginfactory without the argument and deprecated old 'createFilter' method.
See ticket for discussion of the reasoning - short version - pattern flags can be passed as part of RegEx expression.
Also guarded the "PatternCompile" method against excepttions - logging and returning null if the pattern fails to compile.