-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Log4j2 doesn't log the PID properly #8865
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
Comments
It's the change in Spring Framework that's caused the change in behaviour. If I add |
So by putting We could reconsider the order of detection: Currently it's Log4J first, then SLF4J. This means that we always go to Log4J 2 directly when available, which seems sensible. That said, we could reverse the check and go through SLF4J whenever possible... |
I've found the underlying cause. Going via SLF4J, Log4j2's binding calls |
The |
OK, I've pushed a corresponding change :-) |
And it's working now thanks to @jhoeller's change in Spring Framework |
This commit improves the `health` endpoint to run health check for a particular component or, if that component is itself a composite, an instance of that component. Concretely, it is now possible to issue a `GET` on `/actuator/health/{component}` and `/actuator/health/{component}/instance` to retrieve the health of a component or an instance of a composite component, respectively. If details cannot be showed for the current user, any request leads to a 404 and does not invoke the health check at all. Closes gh-8865
The logging of the PID with Log4j2 is behaving rather strangely. For the first few log lines its
????
, it then changes to the process's actual PID, before changing back to????
:The pid is made available to Log4j2 as a system property and the system property is resolved during initialisation. If that initialisation is now happening earlier than before, it would explain why we see
????
. Interestingly, the three lines where the PID is correct are from Tomcat. It uses JUL so it's taking a different route into Log4j2 than the other logging which is all from Spring Boot or Spring Framework.Two related changes have been made recently that might have triggered this:
The text was updated successfully, but these errors were encountered: