Property Substitution - lookup default value?

2018-03-01 Thread Michael Heinen
I would like to use a system var in the file name. If it is not specified an environment var should be used as fallback. I tried 1) fileName="${sys:valueA:-env:valueB}/foo.log" 2) fileName="${sys:valueA:-${env:valueB}}/foo.log" 3)     ${env:valueB}         fileName="${sys:valueA}foo.log"

Re: Programmatically added loggers lost due to automatic reconfiguration

2017-10-10 Thread Michael Heinen
Thanks Gary! That was exactly what I was looking for. Michael Am 06.10.2017 um 17:09 schrieb Gary Gregory: Hi Michael, How about using org.apache.logging.log4j.core.config.Configuration.addListener(ConfigurationListener) ? Gary On Fri, Sep 29, 2017 at 6:30 AM, Michael Heinen <m

Programmatically added loggers lost due to automatic reconfiguration

2017-09-29 Thread Michael Heinen
I use Log4j 2.9.1 with the XML configuration. A monitorInterval is specified in the XML config in order to reconfigure log4j, e.g. for debugging. Besides the XML configuration some loggers and appendes are created dynamically in Java. Problem: The dynamically added loggers and appenders are