Thanks! I did not succeed however. I am using a LoggerConfig to which I add
the appender. I have tried:

        public void flush() {
                Configurator.shutdown((LoggerContext)LogManager.getContext());
        }

I does not work. I suspect this is incorrect: I get an interface and
"shutdown" expects an object of the LoggerContext class (which implements
the interface). Do I have to get to some other LoggerContext object from my
LoggerContext and RollingFileAppender objects? I don't know how to do this.
Thanks.

P.S. I would have expected a straightforward way to do a "flush", I don't
know why basic functionality is much more obscured compared to 1.x. But this
may be because the increase in complexity.



--
View this message in context: 
http://apache-logging.6191.n7.nabble.com/Flushing-FileAppender-explicitly-tp36205p36285.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to