tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Watson" <>
Subject Re: no contexts, several webapps, autoDeploy, different loggers?
Date Thu, 15 Jan 2004 07:45:00 GMT
In order to have a seperate log file for each web app you will need a
logger for each context.

Tomcat3 had ContextXmlReader that would allow you put context
configuration for each webapp in its own file. It also had LogSetter
name=servlet_log that you could define in <ContextManager> and log all
your servlets to the same file. Not sure what replace these in tc4 & 5.

Did you try using Logger inside <DefaultContext>? I would expect it
write all your app logs to one file, but don't know for sure.

Hope others have better answers. I'd like to know more too.
>>> 01/14/04 19:06 PM >>>

i have a server.xml configured with the following Host element:

      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"

      <Host name="" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

        <Context path="/manager" debug="0" privileged="true"
           <Realm className="org.apache.catalina.realm.MemoryRealm" />

        <Context path="/admin" debug="0" privileged="true"
           <Realm className="org.apache.catalina.realm.MemoryRealm" />

when tomcat starts up, it deploys all the webapps found in appBase. it
uses the global logger defined

is it possible, using the DefaultContext or otherwise to have individual
loggers for each auto-deployed *without* adding a 

<Context path="webapp1">
  <Logger prefix="webapp1." suffix=".log" />

in server.xml? is there something like

  <Logger prefix="$auto-deploy-webapp" suffix=".log" />

or conceptually similiar way to achieve this result? i do not want to
add the individual <Context> entries into server.xml....

thanks in advance for any pointers.

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

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

View raw message