Skip to content

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

Conversation

artembilan
Copy link
Member

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

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`
Copy link
Member

@wilkinsona wilkinsona left a 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;
Copy link
Member

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.

Copy link
Member Author

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.
Copy link
Member

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?

Copy link
Member Author

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!

Copy link
Member

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
@wilkinsona wilkinsona changed the title Expose spring.integration.management properties Provide a configuration property for Spring Integration's default logging Oct 19, 2021
@wilkinsona wilkinsona added this to the 2.6.0-RC1 milestone Oct 19, 2021
@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 19, 2021
@wilkinsona wilkinsona changed the title Provide a configuration property for Spring Integration's default logging Provide a configuration property for enabling/disabling Spring Integration's default logging Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants