Read environment variables from logback configuration file

前端 未结 6 1892
别那么骄傲
别那么骄傲 2020-12-12 23:29

I have this logback.xml file:



  

        
6条回答
  •  攒了一身酷
    2020-12-12 23:59

    Things are actually working as designed: logback doesn't read environment variables at all when doing variable substitution. Quoting the documentation:

    The value of the substituted variable can be defined in the configuration file itself, in an external properties file or as a system property.

    So, either use one of the mentioned solutions or get OSC_HOME_IS_UNDEFINED :)

提交回复
热议问题