spring-projects / spring-projects/spring-boot

Add rolling policy properties for log4j2 configuration

Open
#46,468 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

Hi,

Using logging.logback.rollingpolicy.max-file-size as an example, I would like to request such configuration to support log4j2 as well. Cos i don't get it why we can configure for logback in application.properties, but not for log4j2?

other configurations to consider to apply to log4j include:
logging.logback.rollingpolicy.clean-history-on-start
logging.logback.rollingpolicy.max-history=
logging.logback.rollingpolicy.total-size-cap

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Spring Boot's existing application.properties support for logging.logback.rollingpolicy.max-file-size, clean-history-on-start, max-history, and total-size-cap, then trace how those properties are applied. Done means equivalent configuration is supported for log4j2 and its behavior is covered by the relevant project 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
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.