feat: Auto-configure Logback appender in Spring Boot integration. #938
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 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