Search code examples
log4j2system-properties

Configure Log4J2 with a System property to use a URL


Log4j2 accepts: -Dlog4j.configurationFile=path/to/log4j2.xml

@see https://logging.apache.org/log4j/2.0/faq.html

But we used to be able to use a real URL like http://host/configuration.xml.

Is there a way to achieve this or has it been removed forever?


Solution

  • -Dlog4j.configurationFile actually accepts URLs as well.