On Thu, 14 Jun 2001, Upadhye, Sujit (GEAE, Foreign National) wrote:

> Hi,
> 
> I have a question regarding servlet log mechanism.
> 
> Where does the servlet.log(String msg, int level) write the message to?

That is totally up to the servlet container to decide.

> Can
> I set the destination in some configuration file? In Tomcat, there is a
> directory users\www\logs. However, this statement apparently does not write
> into it.
> 

Different versions of Tomcat are configured differently, but they
certainly do write to files in the logs directory if you configure them
to.  For example, in Tomcat 4 you'll see an entry like this in server.xml:

  <Logger className="org.apache.catalina.logger.FileLogger"
          prefix="catalina_log." suffix=".txt"
          timestamp="true"/>

which establishes that the default logger (unless you override it at a
lower level) writes to files named "catalina_log.YYYY-MM-DD.txt" in the
logs directory.

Other servlet containers will provide their own mechanisms for
configuring where logging goes.

> Thanks in advance,
> 
> Sujit
> 

Craig


Reply via email to