Using system environment variables in log4j xml configuration

前端 未结 5 1778
暖寄归人
暖寄归人 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:44

    This syntax is documented only in log4j 2.X so make sure you are using the correct version. It does not work on the 1.X versions.

        
        
            
                %d %p %c{1.} [%t] %m %ex%n
            
        
    
    

提交回复
热议问题