You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ben Bookey <be...@gistec-online.de> on 2004/06/22 17:01:34 UTC

Tomcat Logging.. whats the best way ?

Dear List,

We have written a webapp, and now I want to add some logging inside.
The app has jsp pages, servlets and a java package of classes for jdbc
database interaction.

O.k. as I understood Tomcat does support logging via, catalina.out etc.
The logfile can even be configured based on each web descriptor web.xml
file. This seems quite flexible until you want to start monitoring
whats going on inside of the com.package, not just inside the servlet
container. So it seems to me that we need to create/use a logger class (e.g.
log4j)
for the package.

Am i right in understanding that its normal-case to use a log4j type
method of logging denug info for internal purposes. Its not recommended
to use JUST Tomcat logging for the complete web app.?

Would appreciate any view,

regards
BB


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Tomcat Logging.. whats the best way ?

Posted by Mike Curwen <g_...@globallyboundless.com>.
I believe that it's 'normal' to use a logging package, rather than
system.out to perform debug logging.  A package like log4j has many
advantages including:
1) It's popular (so you get support and lots of people can help)
2) It's super-configurable (you can turn each class/package on or off,
or adjust its logging level)
3) It's not system.out  (which may not always be under your control)


> -----Original Message-----
> From: Ben Bookey [mailto:ben.bookey@gistec-online.de] 
> Sent: Tuesday, June 22, 2004 10:02 AM
> To: Tomcat User List
> Subject: Tomcat Logging.. whats the best way ?
> 
> 
> 
> Dear List,
> 
> We have written a webapp, and now I want to add some logging 
> inside. The app has jsp pages, servlets and a java package of 
> classes for jdbc database interaction.
> 
> O.k. as I understood Tomcat does support logging via, 
> catalina.out etc. The logfile can even be configured based on 
> each web descriptor web.xml file. This seems quite flexible 
> until you want to start monitoring whats going on inside of 
> the com.package, not just inside the servlet container. So it 
> seems to me that we need to create/use a logger class (e.g.
> log4j)
> for the package.
> 
> Am i right in understanding that its normal-case to use a 
> log4j type method of logging denug info for internal 
> purposes. Its not recommended to use JUST Tomcat logging for 
> the complete web app.?
> 
> Would appreciate any view,
> 
> regards
> BB
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org