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

GH-550: Upgrade to log4j2 2.23.1 #551

Closed
wants to merge 3 commits into from

Conversation

ihrasko
Copy link
Contributor

@ihrasko ihrasko commented Apr 26, 2024

Upgrade log4j2 from 2.22.1 to 2.23.1.

Upgrade log4j2 from 2.22.1 to 2.23.1.

Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Update log4j2 version in readme from 2.22.1 to 2.23.1 for 2.2.x branch.

Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
@jbonofre
Copy link
Member

Did you check class updates in api bundle ? That's actually the most important to check for an update.

@grgrzybek
Copy link
Member

True - unfortunately we have to shade some classes. See for example 54f2d59.
When I update Log4j2, I check out related https://github.com/apache/logging-log4j2/ branch and compare (like git diff rel/2.22.1..rel/2.23.1 -- path/to/what/we/shade/in/pax-logging to check if we need to pick up some changes.

I can do this next week.

@ihrasko ihrasko marked this pull request as draft April 26, 2024 14:09
@grgrzybek
Copy link
Member

Yikes, there's a lot of changes in StatusLogger...:

$ git lg rel/2.22.1..rel/2.23.1 -- log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java
* (2024-03-06 09:34:20 +0100) a4a8e99a7c Fix `StatusLogger` to correctly read `log4j2.StatusLogger.properties` (#2354) <Volkan Yazıcı>
* (2024-03-01 14:49:28 +0100) c5420410df Fix `StatusLogger` log level filtering when debug mode is enabled (#2337, #2338) <Volkan Yazıcı>
* (2024-02-27 21:59:44 +0100) af045db99e Fix `StatusLogger` time-zone issues and stack overflow (#2322) <Volkan Yazıcı>
* (2024-02-12 20:33:42 +0100) 7a7555663c Improve `StatusLogger` javadoc <Volkan Yazıcı>
* (2024-02-12 20:02:48 +0100) e87064f22d Reset the fallback listener on `StatusLogger#reset()` (#2280) <Volkan Yazıcı>
* (2024-02-08 13:29:25 +0100) ce1a3a432e Make `StatusLogger` self-contained and testable (#2249) <Volkan Yazıcı>

Update log4j2 classes since 2.22.1 to 2.23.1.

Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
@grgrzybek
Copy link
Member

No no no no ;) If we just shade without changing, we wouldn't have to do it at all ;)
See for example changes made in StatusLogger after upgrading to 2.11.2: 02bcfca#diff-ff765668251d1511bc1870ffade3dfe4105cb9bc9b1fd8dc57da6e1cfbcc61df

You seem to have simply copied the sources and removed Pax Logging specific changes. Did you run the tests? (maybe they work? :)

@grgrzybek grgrzybek closed this in a85757b Apr 29, 2024
@ihrasko ihrasko deleted the bump-log4j2-to-2.23.1 branch April 29, 2024 12:10
@ihrasko
Copy link
Contributor Author

ihrasko commented Apr 29, 2024

Thanks for your help. I will try to make it better next time.

@grgrzybek
Copy link
Member

No worries - it's not something that can be done without spending a lot of time in Pax Logging ;) Thanks for the PR anyway.
Mind that Pax Logging's first commit was made almost 20 years ago and the amount of technical debt here is enormous. When I first actively joined at 1.10 time to make 1.11 release, I've increased number of integration tests from around 2 to more than 100 - it was a huge undertaking... ;)

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.

None yet

3 participants