logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adischlesinger <aschlesin...@computervoice.ro>
Subject Re: Flushing FileAppender explicitly
Date Mon, 25 Mar 2013 16:41:22 GMT
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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message