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

Defer creating logger in StandardWebSocketHandlerAdapter #25428

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Jul 20, 2020

Defer creating logger for StandardWebSocketHandlerAdapter to avoid early log4j2 initializing

Fix #25427

Defer creating logger for StandardWebSocketHandlerAdapter to avoid early log4j2 initializing
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 20, 2020
@jhoeller jhoeller self-assigned this Jul 20, 2020
@jhoeller jhoeller added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jul 20, 2020
@jhoeller jhoeller added this to the 5.2.8 milestone Jul 20, 2020
@jhoeller jhoeller changed the title Defer creating logger Defer creating logger in StandardWebSocketHandlerAdapter Jul 20, 2020
@jhoeller
Copy link
Contributor

jhoeller commented Jul 20, 2020

According to the lifecycle of such endpoint classes, it looks like it will be sufficient to change the logger field to non-static, allowing for reuse of the Log instance and for earlier detection of logger configuration problems. Unless you see problems with this, I'm going to proceed with such a field-level change against your original report, backporting it all the way down to the 4.3.x line.

Thanks for the PR, in any case! And good timing there, we got the whole range of backport releases scheduled for tomorrow...

@jhoeller jhoeller closed this Jul 20, 2020
@jhoeller jhoeller removed this from the 5.2.8 milestone Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Defer creating logger in StandardWebSocketHandlerAdapter
3 participants