Using system environment variables in log4j xml configuration

前端 未结 5 1777
暖寄归人
暖寄归人 2020-11-30 00:59

Is it possible to reference system environment variables (as opposed to Java system properties) in a log4j xml configuration file?

I\'d like to be able to do somethi

5条回答
  •  自闭症患者
    2020-11-30 01:46

    Create a system variable. I prefer to use setenv.bat for such variables.

    @echo off
    rem app specific log dir
    set "APP_LOG_ROOTDIR=../app/app-log"
    exit /b 0
    

    Add reference in log4j.xml file

    
      
      
      
      
      
       
      
    
    

提交回复
热议问题