Re: Log4j 2.x Web app initialization logging

2014-09-05 Thread Mikael Ståldal
Nice.


On Thu, Sep 4, 2014 at 8:32 PM, Matt Sicker boa...@gmail.com wrote:

 I've fixed this in the master branch.


 On 4 September 2014 11:24, Mikael Ståldal 
 mikael.stal...@appearnetworks.com
  wrote:

  I think it makes sense to log to ServletContext.log() if something goes
  wrong, but not otherwise.
 
  Shouldn't we consider ServletContext.log() as deprecated, and Log4j as
 the
  replacement for it?
 
 
 
  On Thu, Sep 4, 2014 at 6:07 PM, Gary Gregory garydgreg...@gmail.com
  wrote:
 
   Should be log only if some condition is met? Like the status logger
 level
   set to DEBUG?
  
   Gary
  
  
   On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal 
   mikael.stal...@appearnetworks.com wrote:
  
Log4jServletContainerInitializer, Log4jServletContextListener,
Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
ServletContext.log() at startup and shutdown.
   
Why? I find this logging noisy when done when everything works fine.
   
--
Mikael Ståldal
Chief Software Architect
*Appear*
Phone: +46 8 545 91 572
Email: mikael.stal...@appearnetworks.com
   
  
  
  
   --
   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
  
 
 
 
  --
  Mikael Ståldal
  Chief Software Architect
  *Appear*
  Phone: +46 8 545 91 572
  Email: mikael.stal...@appearnetworks.com
 



 --
 Matt Sicker boa...@gmail.com




-- 
Mikael Ståldal
Chief Software Architect
*Appear*
Phone: +46 8 545 91 572
Email: mikael.stal...@appearnetworks.com


Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Gary Gregory
FWIW, I do not see any logging in Log4jServletContextListener ;-)

G


On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal 
mikael.stal...@appearnetworks.com wrote:

 Log4jServletContainerInitializer, Log4jServletContextListener,
 Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
 ServletContext.log() at startup and shutdown.

 Why? I find this logging noisy when done when everything works fine.

 --
 Mikael Ståldal
 Chief Software Architect
 *Appear*
 Phone: +46 8 545 91 572
 Email: mikael.stal...@appearnetworks.com




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


Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Gary Gregory
Should be log only if some condition is met? Like the status logger level
set to DEBUG?

Gary


On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal 
mikael.stal...@appearnetworks.com wrote:

 Log4jServletContainerInitializer, Log4jServletContextListener,
 Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
 ServletContext.log() at startup and shutdown.

 Why? I find this logging noisy when done when everything works fine.

 --
 Mikael Ståldal
 Chief Software Architect
 *Appear*
 Phone: +46 8 545 91 572
 Email: mikael.stal...@appearnetworks.com




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


Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Matt Sicker
Perhaps we should log to StatusLogger rather than to ServletContext.log()?
I mean, we even have an appender that goes to the ServletContext log, so it
might be a better idea to just use the StatusLogger as usual (unless an
error occurs?).


On 4 September 2014 11:07, Gary Gregory garydgreg...@gmail.com wrote:

 Should be log only if some condition is met? Like the status logger level
 set to DEBUG?

 Gary


 On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal 
 mikael.stal...@appearnetworks.com wrote:

  Log4jServletContainerInitializer, Log4jServletContextListener,
  Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
  ServletContext.log() at startup and shutdown.
 
  Why? I find this logging noisy when done when everything works fine.
 
  --
  Mikael Ståldal
  Chief Software Architect
  *Appear*
  Phone: +46 8 545 91 572
  Email: mikael.stal...@appearnetworks.com
 



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




-- 
Matt Sicker boa...@gmail.com


Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Mikael Ståldal
I see this line in the source code for version 2.0.2 (line 36):

this.servletContext.log(Log4jServletContextListener ensuring that
Log4j starts up properly.);



On Thu, Sep 4, 2014 at 6:06 PM, Gary Gregory garydgreg...@gmail.com wrote:

 FWIW, I do not see any logging in Log4jServletContextListener ;-)

 G


 On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal 
 mikael.stal...@appearnetworks.com wrote:

  Log4jServletContainerInitializer, Log4jServletContextListener,
  Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
  ServletContext.log() at startup and shutdown.
 
  Why? I find this logging noisy when done when everything works fine.
 
  --
  Mikael Ståldal
  Chief Software Architect
  *Appear*
  Phone: +46 8 545 91 572
  Email: mikael.stal...@appearnetworks.com
 



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




-- 
Mikael Ståldal
Chief Software Architect
*Appear*
Phone: +46 8 545 91 572
Email: mikael.stal...@appearnetworks.com


Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Mikael Ståldal
I think it makes sense to log to ServletContext.log() if something goes
wrong, but not otherwise.

Shouldn't we consider ServletContext.log() as deprecated, and Log4j as the
replacement for it?



On Thu, Sep 4, 2014 at 6:07 PM, Gary Gregory garydgreg...@gmail.com wrote:

 Should be log only if some condition is met? Like the status logger level
 set to DEBUG?

 Gary


 On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal 
 mikael.stal...@appearnetworks.com wrote:

  Log4jServletContainerInitializer, Log4jServletContextListener,
  Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
  ServletContext.log() at startup and shutdown.
 
  Why? I find this logging noisy when done when everything works fine.
 
  --
  Mikael Ståldal
  Chief Software Architect
  *Appear*
  Phone: +46 8 545 91 572
  Email: mikael.stal...@appearnetworks.com
 



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




-- 
Mikael Ståldal
Chief Software Architect
*Appear*
Phone: +46 8 545 91 572
Email: mikael.stal...@appearnetworks.com


Re: Log4j 2.x Web app initialization logging

2014-09-04 Thread Matt Sicker
I've fixed this in the master branch.


On 4 September 2014 11:24, Mikael Ståldal mikael.stal...@appearnetworks.com
 wrote:

 I think it makes sense to log to ServletContext.log() if something goes
 wrong, but not otherwise.

 Shouldn't we consider ServletContext.log() as deprecated, and Log4j as the
 replacement for it?



 On Thu, Sep 4, 2014 at 6:07 PM, Gary Gregory garydgreg...@gmail.com
 wrote:

  Should be log only if some condition is met? Like the status logger level
  set to DEBUG?
 
  Gary
 
 
  On Thu, Sep 4, 2014 at 12:03 PM, Mikael Ståldal 
  mikael.stal...@appearnetworks.com wrote:
 
   Log4jServletContainerInitializer, Log4jServletContextListener,
   Log4jServletFilter and Log4jWebInitializerImpl log some stuff using
   ServletContext.log() at startup and shutdown.
  
   Why? I find this logging noisy when done when everything works fine.
  
   --
   Mikael Ståldal
   Chief Software Architect
   *Appear*
   Phone: +46 8 545 91 572
   Email: mikael.stal...@appearnetworks.com
  
 
 
 
  --
  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
 



 --
 Mikael Ståldal
 Chief Software Architect
 *Appear*
 Phone: +46 8 545 91 572
 Email: mikael.stal...@appearnetworks.com




-- 
Matt Sicker boa...@gmail.com