Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple web applications, one virtual host, access logging  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I am attempting to create access logs on a per web application basis,
using a single virtual host in my server.xml file. Here is what I

<Host name="" autoDeploy="false"
deployOnStartup="false" deployXML="false">
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="mysite_access" suffix=".log" pattern="common"
<Context path="" docBase="html" debug="0" reloadable="true"/>
<DefaultContext cookies="true" crossContext="true" override="true"/>
<Context path="/Web1" docBase="C:\jboss-4.0.1RC2\server\default
\deploy" debug="0" reloadable="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.home.dir}/log" prefix="my_web1" suffix=".log" resolveHosts="false" pattern="combined"/
<Context path="/images" appBase="" docBase="C:\jboss-4.0.1RC2\server\default\images" debug="99">
<Context path="/Web2" docBase="C:\jboss-4.0.1RC\server\default\deploy" debug="0" reloadable="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="${jboss.server.home.dir}/log" prefix="my_web2" suffix=".log" resolveHosts="false" pattern="combined"/

Everything is working as it should, the my_web1.log and my_web2.log files are being created. The problem is that when I hit or the only log that gets updated is mysite_access.log.

Can someone please explain to me how to go about writing to the my_web1.log and my_web2.log files for those applications?

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!