[logback-user] Logging outage in WebLogic with RollingFileAppender
ceki
ceki at qos.ch
Tue Apr 16 16:01:19 CEST 2013
Hi Rox,
Are you stopping logback when your application is stopped (and then
started)? The conextDestroyed method of
javax.servlet.ServletContextListener is a good place for invoking such
code:
import javax.servlet.ServletContextListener;
import javax.servlet.ServletContextEvent;
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.LoggerContext;
public class MyServletContextListener implements
ServletContextListener {
public void contextInitialized(ServletContextEvent sce) {
}
public void contextDestroyed(ServletContextEvent sce) {
LoggerContext lc =
(LoggerContext) LoggerFactory.getILoggerFactory();
lc.stop();
}
Please let us know if stopping logback as described above helps.
On 16.04.2013 15:06, Roxolid wrote:
> Hi all,
>
> I have a trouble with logback configuration under WebLogic 12c. My
> application is using RollingFile Appender with TimeBasedRollingPolicy
> and the problem is it stops logging every time I stop and then start the
> application through WebLogic Console. However, the logging is back when
> a rollover occurs - in the new file logging continues...
>
> Has anyone faced such behavior (and knows the solution)?
>
> Thank you in advance.
>
> Regards,
>
> rox
>
--
Ceki
65% of statistics are made up on the spot
More information about the Logback-user
mailing list