See also https://logging.apache.org/log4j/log4j-2.3/manual/webapp.html
Gary On Fri, Jul 3, 2015 at 7:38 AM, Jose Luis Valencia <jvalen...@rocoto.com.pe> wrote: > I am working with Java components that use JUL in a web application and I > am not able to get JUL logs routed to log4j 2, I added the required maven > dependency for log4j-jul and set > -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager in the > command line but maven gives an NoSuchClassexception because > org.apache.logging.log4j.jul.LogManager is not yet loaded and by > System.setProperty() in a spring CustomWebApplicationInitializer but > https://logging.apache.org/log4j/log4j-2.2/log4j-jul/index.html says it > must be called before any call of to LogManager or Logger. ¿Where I should > set the system property in a web application? > > Thank you! > > *JOSÉ L. VALENCIA G.* > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory