logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naresh Sharma" <naresh_k_sha...@yahoo.com>
Subject Flushing Appender buffer
Date Tue, 09 Oct 2001 20:05:53 GMT
Hello Everybody,

Sorry for reposting the same message again..but i couldn;t get any help, that's why sending

I am using RollingFileAppender in my EJB application. I set the immediateFlush to false, so
it log messages needn't flushing each time but when my application closes, all the pending
messages from buffer should be flushed.

I didn't find any flush() method but there is a method setImmediateFlush(boolean) which sets
immediateFlush option.

So i thought about this solution :

    // Put some dummy message in the log buffer so while logging this message previous buffer
contents will also get logged.
    cat.debug("Dummy message");

Is there any other better way of doing this ??


View raw message