Hi Ceki,

well, half-true in my case... I have that code in my contextDestroyed(..) method, however, for whatever reason I have lc.reset() instead of lc.stop there... Will change and test that once I'm back to my dev machine. I will let you know then.

Thank you for your help.

Regards,
rox



On Tue, Apr 16, 2013 at 4:01 PM, ceki <ceki@qos.ch> wrote:
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
_______________________________________________
Logback-user mailing list
Logback-user@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-user