Do I need to flush events when shutting down using logback?

后端 未结 4 1922
傲寒
傲寒 2021-01-08 01:02

We are migrating to logback from log4j for several web apps. In the shutdown of our application we currently call:

org.apache.log4j.LogManager.shutdown();
<         


        
4条回答
  •  囚心锁ツ
    2021-01-08 01:13

    It seems that just adding into configuration should stop the context.

    From logback docs:

    
       
       
      .... 
    
    

    And from DelayingShutdownHook summary:

    ShutdownHook implementation that stops the Logback context after a specified delay. The default delay is 0 ms (zero).

提交回复
热议问题