Hi Christoph, Thanks for your detailed explanation, even though its a huge change for application to move from both slf4j and log4j1 to Log4j2, lets assume we moved all to Log4j2 but if the underlying application server eg: Jboss or wildfly have its own wrapper implementation for their logging with log4j1, which will print application generated log using stdout (This is what we have noticed after struts2 upgrade). Lets assume we turned off logging subsystem from Jboss and used Log4js log4j2.xml which gives less flexibility (changing threshold on the fly) wrt logging in different environment when we compare to jboss one.
These all are our concern, we really doubt upgrading struts2, if log is directing to stdout. Please let us know if anyone have any thought regarding this or anyone successfully upgraded without stdout logging in Wildfly or Jboss 6. On Tue, Jul 19, 2016 at 2:00 PM, Christoph Nenning < christoph.nenn...@lex-com.net> wrote: > > I'm not sure about bridging log4j1 to log4j2 gives us any benefit from > > enduser point of view, and most the people were using slf4j and log4j 1 > for > > sure, with the addition of log4j2 the chain is getting complex for a > simple > > logging. > > > > > > > In our apps we have been using slf4j and log4j1 for some time. As log4j1 > has been deprecated and struts 2.5 moved to log4j2-api we switched our > logging impl to slf4j2 and created appropriate xml config files. To also > grab log messages via slf4j we added log4j-slf4j-impl. > > See: > https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/ > > > That means our logging pipeline looks like this: > > > > slf4j-api ----> log4j-slf4j-impl -\ > |--> log4j-core (v2) > log4j-api (v2) -------------------/ > > > > > Why can't struts2 can make a log wrapper around it based on the > > available logging lib? > > > That has been discussed on -dev mailing list. Reasons that I remember: > - log4j2 is backed by the ASF > - log4j2 can do everything slf4j can do > - There are all kinds of bridging libraries to connect with other logging > APIs and implementations > > > > Regards, > Christoph > > > > > > On Mon, Jul 18, 2016 at 9:14 PM, Adam Brin <ab...@digitalantiquity.org> > > wrote: > > > > > Hi Emi, > > > You’ll definitely need a log4j2.xml, and you may need to change the > > > listeners and also omit some other log4j 1.0 libraries from your pom. > We > > > did the upgrade last year and found the docs on the log4j2 website > useful, > > > you might start there. > > > > > > best of luck. > > > > > > -- > > > _________________________________________________________ > > > Adam Brin > > > Director of Technology, Digital Antiquity > > > 480.965.1278 > > > > > > > On Jul 18, 2016, at 8:37 AM, Emi <em...@encs.concordia.ca> wrote: > > > > > > > >> try the bridge to log4j1 > > > >> https://logging.apache.org/log4j/log4j-2.2/log4j-1.2-api/index.html > > > >> > > > > > > > > Updated to: > > > > . log4j-api-2.6.2.jar > > > > . log4j-core-2.6.2.jar > > > > . log4j-web-2.6.2.jar > > > > . log4j-1.2-api-2.6.2.jar > > > > . commons-logging-1.2.jar > > > > . struts2.5.2. jars > > > > > > > > Didn't change web.xml and log4j.xml. > > > > > > > > But log files were NOT auto-generated by tomcat7.0.70. > > > > > > > > Is there something that I missed to add/config? > > > > > > > > Thanks a lot! > > > > -- > > > > web.xml > > > > ... > > > > <listener> > > > > > > > <listener-class>org.springframework.web.util.Log4jConfigListener</ > > listener-class> > > > > </listener> > > > > ... > > > > <context-param> > > > > <param-name>log4jExposeWebAppRoot</param-name> > > > > <param-value>false</param-value> > > > > </context-param> > > > > > > > > <context-param> > > > > <param-name>log4jConfigLocation</param-name> > > > > <param-value>/WEB-INF/classes/log4j.xml</param-value> > > > > </context-param> > > > > ... > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > This Email was scanned by Sophos Anti Virus >