-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Provide a configuration property for enabling/disabling Spring Integration's default logging #28355
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
Provide a configuration property for enabling/disabling Spring Integration's default logging #28355
Conversation
To let end-user to avoid unconventional way to manage configuration via extra `@Enable...` annotation declaration expose respective configuration properties instead * Add `spring.integration.management.logging-enabled` property and handle it in the `EnableIntegrationManagementConfiguration` propagating its value to the respective Spring Integration `@EnableIntegrationManagement` annotation * Cover the property with a unit-test * Remove obsolete and redundant info from the `spring-integration.adoc`
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.
Thanks, Artem. I left a couple of comments for your consideration when you have a moment.
/** | ||
* Logging management in the integration components. | ||
*/ | ||
boolean loggingEnabled = true; |
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 wonder if this should be called defaultLoggingEnabled
to match the annotation's attribute.
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.
Sure! I can rename it for consistency.
Originally I had in mind just logging
for this property name 🥶
@@ -46,6 +46,3 @@ Spring Boot can also auto-configure an `ClientRSocketConnector` using configurat | |||
---- | |||
|
|||
See the {spring-boot-autoconfigure-module-code}/integration/IntegrationAutoConfiguration.java[`IntegrationAutoConfiguration`] and {spring-boot-autoconfigure-module-code}/integration/IntegrationProperties.java[`IntegrationProperties`] classes for more details. | |||
|
|||
By default, if a Micrometer `meterRegistry` bean is present, Spring Integration metrics will be managed by Micrometer. |
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.
This looks to be unrelated to the rest of the changes. Could it please be made separately?
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.
Agree. It's not related, but this one had to be done long time ago.
Was going to add something about a new prop, but then I realized that we point already to JavaDocs for those IntegrationProperties
.
Meanwhile this sentence made my eyes to bleed since we don't have those legacy metrics for years already.
The Micrometer is de-facto only single metrics mechanism we support, so I find an obvious message in the docs as redundant.
If you still insist, I can move it to separate PR.
Let me know, please, if you are OK with that property placeholder approach in the EnableIntegrationManagementConfiguration
instead of direct IntegrationProperties
processing and respective beans configuration.
Thank you for feedback, Andy!
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.
If you still insist, I can move it to separate PR.
Yes please, Artem. It sounds like we should get rid of that sentence in 2.4.x and later whereas the rest of the changes proposed here will land in 2.6.
* Rename new property to `defaultLoggingEnabled` to align with its target property in Spring Integration
To let end-user to avoid unconventional way to
manage configuration via extra
@Enable...
annotationdeclaration expose respective configuration properties
instead
spring.integration.management.logging-enabled
propertyand handle it in the
EnableIntegrationManagementConfiguration
propagating its value to the respective Spring Integration
@EnableIntegrationManagement
annotationspring-integration.adoc