Skip to content

[main] Create DefaultLayout independent of PatternLayout #3584

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

Merged
merged 1 commit into from
Apr 13, 2025

Conversation

ppkarwasz
Copy link
Contributor

Currently, PatternLayout and all its patterns are a required element of Log4j Core, since DefaultConfiguration uses it. The default configuration is used in all Log4j Core installation as failsafe to handle logging between the time a logger context is created and the real configuration starts (a couple of ms).

This PR creates a simple hardcoded layout to use with DefaultConfiguration, based on the StatusData formatter.

(cherry picked from commit e8d5ffc)

Currently, `PatternLayout` and all its patterns are a required element of Log4j Core, since `DefaultConfiguration` uses it.
The default configuration is used in all Log4j Core installation as failsafe to handle logging between the time a logger context is created and the real configuration starts (a couple of ms).

This PR creates a simple hardcoded layout to use with `DefaultConfiguration`, based on the `StatusData` formatter.

(cherry picked from commit e8d5ffc)

Co-authored-by: Piotr P. Karwasz <[email protected]>
Co-authored-by: Volkan Yazıcı <[email protected]>
Copy link

github-actions bot commented Apr 1, 2025

Job Requested goals Build Tool Version Build Outcome Build Scan®
build-macos-latest clean install 3.9.8 Build Scan PUBLISHED
build-ubuntu-latest clean install 3.9.8 Build Scan PUBLISHED
build-windows-latest clean install 3.9.8 Build Scan PUBLISHED
Generated by gradle/develocity-actions

@ppkarwasz ppkarwasz moved this from To triage to In review in Log4j bug tracker Apr 1, 2025
@ppkarwasz ppkarwasz changed the title [main] Create DefaultLayout independent of PatternLayout (#3118) [main] Create DefaultLayout independent of PatternLayout Apr 1, 2025
@ppkarwasz ppkarwasz merged commit 090abbd into main Apr 13, 2025
11 checks passed
@ppkarwasz ppkarwasz deleted the backport-e8d5ffc-main branch April 13, 2025 19:50
@github-project-automation github-project-automation bot moved this from In review to Done in Log4j bug tracker Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants