-Dlogback.configurationFile=logback.xml ignored when running Spring-Boot

后端 未结 8 770
太阳男子
太阳男子 2020-12-23 19:57

We have a spring-boot 1.0.RC1 application, with logback configured for logging and a logback.xml file in src/test/resources. When we run spring-boot from maven, the logback

8条回答
  •  离开以前
    2020-12-23 20:01

    Add logback file path in application.properties file . Example test folder contains app.jar and config folder as below
    test
    |- app.jar
    |- config
            |--- application.properties
            |--- logback.xml

    Then add logging.config:config\\logback.xml. Then try , it will work

提交回复
热议问题