Hi, Dhaval. 

        Unless you have added log4j support, i think tomcat 6 installation use
java4 log as default log engine. Could this be the problem ? Have you
tried to change conf/logging.properties ?
        Another components (using commons logging for instance) can be using
the log4j.properties in tomcat classpath.


On Tue, 2009-06-30 at 08:59 -0700, Dhaval Patel wrote:
> Hello all,
> 
> I have virtual hosting enabled in tomcat 6.0.18. But I can not forward logs 
> into proper log files.
>  I wants to have two log files, one for tomcat and one for virtual host. 
> Following is my configuration:
> 
> Server.xml
> --------------
>       <Host name="a.localhost" appBase="/full/path/to/appbase"
>             unpackWARs="true" autoDeploy="true"
>             xmlValidation="false" xmlNamespaceAware="false">
>            <Context path="" docBase="a" override="true" reloadable="true" 
> crossContext="true" allowLinking="true" />
>            <Valve
>                className="org.apache.catalina.valves.FastCommonAccessLogValve"
>                directory="logs"
>                prefix="a_access_log."
>                suffix=".txt"
>                pattern="common"
>                resolveHosts="false" />
>       </Host>
> 
> Log4j.properties (/tomcat/lib/log4j.properties)
> ---------------------
> log4j.rootLogger=ERROR, R
> 
> log4j.appender.R=org.apache.log4j.RollingFileAppender
> log4j.appender.R.File=${catalina.home}/logs/tomcat.log
> log4j.appender.R.MaxFileSize=1MB
> log4j.appender.R.MaxBackupIndex=10
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
> 
> 
> # Logging for sbus
> log4j.appender.A=org.apache.log4j.RollingFileAppender
> log4j.appender.A.File=${catalina.home}/logs/a.log
> log4j.appender.A.MaxFileSize=1MB
> log4j.appender.A.MaxBackupIndex=1
> log4j.appender.A.layout=org.apache.log4j.PatternLayout
> log4j.appender.A.layout.ConversionPattern=%d - %5p (%C:%L) - %m%n
> 
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=INFO,
>  R
> log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=false
> 
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[a.localhost]=DEBUG,
>  A
> log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[a.localhost]=false
> 
> 
> The problem:
> ---------------
> All 404 errors and other application errors from http://a.localhost goes to 
> tomcat.log instead of 
> a.log. a.log however does have messages when you start tomcat.
> 
> Am I  missing something?
> 
> Thanks.
>  Regards,
> Dhaval
> 
> 
> 
>       
-- 
"If there must be trouble, let it be in my day, 
 that my child may have peace."

Thomas Paine


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to