Logback: how to change log directory from “tomcat/bin” to application related?

后端 未结 2 672
长发绾君心
长发绾君心 2021-02-15 10:53

I want to use slf4j with logback for logging.

You can see my logback.xml below:


    

        
2条回答
  •  说谎
    说谎 (楼主)
    2021-02-15 11:36

    If you do not want to save your logs in Tomcat's bin folder then use ${catalina.base} as file path prefix in logback.xml file.

    ${catalina.base}/logs/log.log
    

    Here log file will be saved in existing logs folder of Tomcat instead of bin.

提交回复
热议问题