Re: [ANN] Apache Struts 2.3.30 GA

2016-07-19 Thread Sreekanth S. Nair
Thanks Christoph, like i mentioned before we don't want to carry more
bridges into logging. I'm not against moving towards log4j2 and i already
changed my entire code base to use log4j2 as a part of struts2 upgrade but
the problem here is application server support, we are using latest version
Wildfly available (10.0.0 GA) so our options are at the extreme.

Thanks Lukasz for pointing out that blog link, which i have already tried
and that doesn't work give the desired log output as i mentioned before all
logs from application is getting written into file as well as console as
INFO [stdout]


On Tue, Jul 19, 2016 at 3:31 PM, Lukasz Lenart 
wrote:

> 2016-07-19 10:55 GMT+02:00 Sreekanth S. Nair <
> sreekanth.n...@egovernments.org>:
> > 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.
>
> As far I know/understand JBoss is using repackaged version of SLF4J
> and it should be manner of configuration to allow both logging
> frameworks to cooperate
> http://blog.c2b2.co.uk/2014/09/alternative-logging-frameworks-for.html
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: [ANN] Apache Struts 2.3.30 GA

2016-07-19 Thread Lukasz Lenart
2016-07-19 10:55 GMT+02:00 Sreekanth S. Nair :
> 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.

As far I know/understand JBoss is using repackaged version of SLF4J
and it should be manner of configuration to allow both logging
frameworks to cooperate
http://blog.c2b2.co.uk/2014/09/alternative-logging-frameworks-for.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: [ANN] Apache Struts 2.3.30 GA

2016-07-19 Thread Christoph Nenning
> From: "Sreekanth S. Nair" 
> To: Struts Users Mailing List , 
> Date: 19.07.2016 10:55
> Subject: Re: [ANN] Apache Struts 2.3.30 GA
> 
> 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.
> 
> 

First of all you can try to include configuration for both log4j versions 
in your app. logj42 config for the app itself and log4j1 config for the 
app server.


If this does not give you desired results you could still use log4j1 as 
log-implementation for the app and forward both APIs (log4j2-api and 
slf4j-api) to log4j1. To achieve that you would need log4j-slf4j-impl.

Your logging pipeline would look like this then:

log4j-api (v2) --> log4j-slf4j-impl --> slf4j-api --> slf4j-log4j12 --> 
log4j (v1)



Keep in mind that log4j1 has been deprecated. It is likely that old app 
servers contain other outdated libraries as well which might cause e.g. 
security issues. You should consider upgrading your app server. But of 
course that can take some time.



Regards,
Christoph



> 
> 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 

> > > 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  
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
> > > > > ...
> > > > > 
> > > > >
> > > > org.springframework.web.util.Log4jConfigListener > > listener-class>
> > > > > 
> > > > > ...
> > > > > 
> > > > >  log4jExposeWebAppRoot
> > > > >  false
> > > > >   
> > > > >
> > > > >   
> > > > >  log4jConfigLocation
> > > > > /WEB-INF/classes/log4j.xml
> > > > >   
> > > > > ...
> > > > >
> > > > >
> > > > >
> > > 

Re: [ANN] Apache Struts 2.3.30 GA

2016-07-19 Thread Sreekanth S. Nair
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 
> > 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  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
> > > > ...
> > > > 
> > > >
> > > org.springframework.web.util.Log4jConfigListener > listener-class>
> > > > 
> > > > ...
> > > > 
> > > >  log4jExposeWebAppRoot
> > > >  false
> > > >   
> > > >
> > > >   
> > > >  log4jConfigLocation
> > > > /WEB-INF/classes/log4j.xml
> > > >   
> > > > ...
> > > >
> > > >
> > > >
> > > >
> -
> > > > 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
>


Re: [ANN] Apache Struts 2.3.30 GA

2016-07-19 Thread Christoph Nenning
> 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 
> 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  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
> > > ...
> > > 
> > >
> > org.springframework.web.util.Log4jConfigListener listener-class>
> > > 
> > > ...
> > > 
> > >  log4jExposeWebAppRoot
> > >  false
> > >   
> > >
> > >   
> > >  log4jConfigLocation
> > > /WEB-INF/classes/log4j.xml
> > >   
> > > ...
> > >
> > >
> > >
> > > 
-
> > > 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