spring-projects / spring-projects/spring-boot
Allow addition of custom logback Actions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
Hi,
I was looking at adding a custom Action via the SpringBootJoranConfigurator but this is not currently possible.
My use case is to enable or disable an appender based on a property via the spring Environment class.
I managed to add a custom action based on the newRule extension, but its not possible to get access to the Environment class.
A way to either configure the SpringBootJoranConfigurator with the LoggingInitializationContext or a new way to enable/disable based on a property would be handy, e.g. like a <conditionalOnProperty property="my.property.enabled" havingValue="true" matchOnMissing=true />
Cheers
Andy
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading SpringBootJoranConfigurator and the LoggingInitializationContext references mentioned in the issue, then inspect how the newRule extension is handled. Determine whether custom Actions should receive the logging context or whether a property-based conditional action is the intended direction. Done means one supported approach is specified and covered by the relevant logging tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100