How to log within shutdown hooks with Log4j2?
问题 Log4j2 also uses shutdown hooks to end it's services. But of course I want to log throughout the whole lifecycle of my application - shutdown included. With Log4j this was no problem. Now it seems to be impossible. Logging shuts down, while my application is still working on it. Has anyone some hope for me? Best regards Martin 回答1: As of 2.0-beta9 this is now configurable in xml <configuration ... shutdownHook="disable"> Considering its now disabled, I guess I need to manually shutdown the