Hello! I don't think this should happen? Can you add breakpoint to this method (LogManager.shutdown), share stack trace with us once it gets hit?
Regards, -- Ilya Kasnacheev вт, 8 окт. 2019 г. в 23:44, Mikael <mikael-arons...@telia.com>: > Hi! > > I gave up on the JUL logging so I went back to log4j 2, this works > better but there is still very weird behavior. > > I run my code as a LifeCycleBean and all works fine, but the moment that > LifeCyclebean::BEFORE_NODE_STOP event is called the log4j 2 logger is > shutdown, if I turn on log4j2.debug=true I see: > > "DEBUG StatusLogger Stopping LoggerContext[name=, > org.apache.logging.log4j.core.LoggerContext@543588e6]" just when the > BEFORE_NODE_STOP event is executed and any logging after that is lost, > it looks like the shutdown hook log4j 2 install is executed at that time > looking at the source code but how is that possible ? I would assume I > am doing something silly as I have not heard any one else complain about > this, any idea what it could be ? > > This all standard log4j2 logging out of the box, I do have a Cassandra > client running with slf4j->log4j2 setup in the same application, but I > do not think that has anything to do with it and I shutdown the > Cassandra client in the AFTER_NODE_STOP event later on. > > Mikael > > > > >