tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "STOCKHOLM, Raymond" <>
Subject RE: easy debugging
Date Wed, 28 Jul 2004 12:49:25 GMT
The best advise I can give you is to use a proper logging API :
Log4J is great :

Just put your file in the classpath of your webapp (WEB-INF/classes),
and log4j will automatically use this configuration.
Note : 
1. log4j.appender.FILE.File=C:/log4j.log  : this is the file where your log will be.
2. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender : you should see the same log in
your tomcat window.

Here is an example of :

log4j.rootLogger=DEBUG, CONSOLE, FILE
# CONSOLE uses PatternLayout.
# The conversion pattern uses format specifiers. You might want to
# change the pattern an watch the output format change.
log4j.appender.CONSOLE.layout.ConversionPattern=%-4r %-5p [%t] %37c %3x - %m%n
# File Appender
log4j.appender.FILE.layout.ConversionPattern=%-4r %-5p [%t] %37c %3x - %m%n

-----Message d'origine-----
De : Vamsee Kanakala []
Envoyé : mercredi 28 juillet 2004 14:44
À : Tomcat Users List
Objet : easy debugging

Hello list users,

    I'm using Tomcat on win2k. There is a window which is always open 
when Tomcat runs. It shows messages like "INFO:" etc. Is there a way I 
can write to this window from inside a servlet? I'm just looking for an 
easy way to debug my servlets.


Because joy is one's fuel - Ayn Rand

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message