-
Notifications
You must be signed in to change notification settings - Fork 627
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
Use of PluginBuilderFactory on AmqpAppender (Log4j2) #1144
Conversation
Refactor @pluginfactory and use of @PluginBuilderFactory Simplify subclasses implementation of AmqpAppender (Log4j2)
@Scip88 Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@Scip88 Thank you for signing the Contributor License Agreement! |
@Scip88 , Thank you for contribution!
Would you mind to demonstrate such a feature in the tests? For example, Also, it sounds like Docs ( |
@artembilan, As indicated in Plugin Builder, the Log4j2 core initializes an Appender (as other log4j plugin) via two possible static methods: I'm working on logging.adoc |
Add Example for Log4j2 subclasses and static factor
@artembilan I've update |
Then why do we do this change at all? Thanks |
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.
Here is some review from me.
Great job anyway! I wish I didn't miss this builder option in the beginning so we wouldn't have that embarrassing message in the docs that Log4J appender cannot be extended. 😄
I'm still waiting for test to cover a new cool functionality.
Thank you very much!
spring-rabbit/src/main/java/org/springframework/amqp/rabbit/log4j2/AmqpAppender.java
Show resolved
Hide resolved
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.
I have done the fix
spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j2/ExtendAmqpAppender.java
Outdated
Show resolved
Hide resolved
spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j2/ExtendAmqpAppenderTest.java
Outdated
Show resolved
Hide resolved
spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j2/ExtendAmqpAppenderTest.java
Outdated
Show resolved
Hide resolved
spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j2/ExtendAmqpAppenderTests.java
Show resolved
Hide resolved
spring-rabbit/src/test/java/org/springframework/amqp/rabbit/log4j2/ExtendAmqpAppenderTests.java
Show resolved
Hide resolved
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.
I think I'm good with this.
Thanks.
@garyrussell , any objections from your side?
@Scip88 Thanks for the contribution! Looking forward to more. @artembilan Thanks for the review. |
resolves #1142
Refactor "@ PluginFactory" and use of "@ PluginBuilderFactory"
Use of PluginBuilderFactory simplifies subclasses' implementations of AmqpAppender (Log4j2)