How can I determine what log configuration source Logback actually used?

后端 未结 4 1249
半阙折子戏
半阙折子戏 2020-12-24 06:01

log4j has a property, log4j.debug, which will helpfully provide the user with an indication of which configuration file was actually used to configure the loggi

4条回答
  •  旧时难觅i
    2020-12-24 06:43

    you can set debug="true" in a logback.xml file that you control like this:

    
    
    (...)
    
    

    and tho make sure that file is going to be used by logback add following VM argument when you start your program:

    -Dlogback.configurationFile=/path/to/yourlogback.xml
    

    This does not really answer to your question but gives you a work around solution.

提交回复
热议问题