Re: Flushing FileAppender explicitly

2013-03-25 Thread adischlesinger
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

Simple (?) question about logging behavior (additive issue?)

2013-03-25 Thread Peter DePasquale
Hi, I've been trying to track down some failure to log in my Tomcat application. In doing so, I've written a small Test class in which I log .entry(), .exit(), .trace(), and error() events (source code is below). I've also copied the log4j2.xml file and the output files created by the logging

Re: Flushing FileAppender explicitly

2013-03-25 Thread Ralph Goers
Sorry, I actually thought this way would be simpler. In addition, cleanly shutting down is usually a good thing. :-) I'll look and see if there is a more direct way to force a flush. Ralph On Mar 25, 2013, at 9:41 AM, adischlesinger wrote: Thanks! I did not succeed however. I am using a