Skip to content
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

feat: Auto-configure Logback appender in Spring Boot integration. #938

Merged
merged 3 commits into from
Sep 23, 2020

Conversation

maciejwalkowiak
Copy link
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Auto-configure SentryAppender in Logback context in Spring Boot integration.

💡 Motivation and Context

Before in order to use Logback and Spring together users had to opt-out from properties based default logging configuration offered in Spring Boot and create custom logback-spring.xml file. It is a common step when configuring custom appenders but definitely something that makes the integration process more difficult.

I found a way to configure appender in auto-configuration process. It works in a way that appender is added only if user has not configured appender manually. Considering I may have not thought about all the possible use cases and logback configurations users may have, I left an option to easily disable this auto-configuration through setting the property sentry.logging.enabled=false.

💚 How did you test it?

Auto-configurations are covered with unit tests and e2e integration tests has been added.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

Copy link
Contributor

@marandaneto marandaneto left a comment

Choose a reason for hiding this comment

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

nice, LGTM.
lets just remember to add the sentry.logging.enabled=false to the logback/spring docs.

@marandaneto marandaneto merged commit 7e30f6d into main Sep 23, 2020
@marandaneto marandaneto deleted the spring-boot-logback-autoconfigure branch September 23, 2020 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants