In log4j, when using a FileAppender with BufferedIO=true and BufferSize=xxx properties (i.e. buffering is enabled), I want to be able to flush the log during normal shutdown procedure. Any ideas on how to do this?
Managed to answer my own question :-)
When shutting down the LogManager:
LogManager.shutdown();
all buffered logs get flushed.