Configure Absolutepath for standalone Applications for case of log4j2.xml -


was using log4j.xml in standalone application programeticallu injecting absolute path defined

domconfigurator.configure("/realpathofxml/log4.xml")

but log4j2.xml instead of log42.xml

how inject absolute path initialize log4j2.xml ?

with regards karthik

try

uri uri = new uri("file:///absolute/path/to/log4j2.xml"); configurator.initialize("my app", null, uri); 

Comments