You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Edmund Urbani <em...@emu.no-ip.org> on 2004/03/31 15:47:46 UTC

2 turbine webapps + log4j

Has anyone tried running 2 turbine-2.3 webapps in the same servlet 
container - both using log4j?
When I do that, both webapps write to the same logfiles:

there's
$WEBAPPS/webapp1/logs/
and
$WEBAPPS/webapp2/logs/

The appenders are configured like this:
log4j.appender.turbine = org.apache.log4j.FileAppender
log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.turbine.append = false

Both webapps write their log to:
$WEBAPPS/webapp1/logs/turbine.log

The directory $WEBAPPS/webapp2/logs/ remains empty.
It seems the ${applicationRoot} variable gets set to $WEBAPPS/webapp1 
for both webapps.
I am not sure whether this is actually a turbine problem, or a 
tomcat-classloader issue or
something with log4j itself, because I don't know how that variable gets 
expanded.
Any ideas?

Cheers,
 Edmund


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: 2 turbine webapps + log4j

Posted by David Demner <tu...@demner.com>.
Hi Edmund,

I also have several webapps, and they're logging fine.  It's probably your
configuration (especially if you just copied one webapp to the other).  The
Log4j.properties in WEB-INF/conf has the definition for ${applicationRoot}
at the top of the file.  Make sure these are different for the different
webapps, and you should be fine.

David

-----Original Message-----
From: Edmund Urbani [mailto:emu@emu.no-ip.org] 
Sent: Wednesday, March 31, 2004 5:48 AM
To: turbine-user@jakarta.apache.org
Subject: 2 turbine webapps + log4j



Has anyone tried running 2 turbine-2.3 webapps in the same servlet 
container - both using log4j?
When I do that, both webapps write to the same logfiles:

there's
$WEBAPPS/webapp1/logs/
and
$WEBAPPS/webapp2/logs/

The appenders are configured like this:
log4j.appender.turbine = org.apache.log4j.FileAppender
log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.turbine.append = false

Both webapps write their log to:
$WEBAPPS/webapp1/logs/turbine.log

The directory $WEBAPPS/webapp2/logs/ remains empty.
It seems the ${applicationRoot} variable gets set to $WEBAPPS/webapp1 
for both webapps.
I am not sure whether this is actually a turbine problem, or a 
tomcat-classloader issue or
something with log4j itself, because I don't know how that variable gets 
expanded.
Any ideas?

Cheers,
 Edmund


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: 2 turbine webapps + log4j

Posted by Stephane James Vaucher <va...@cirano.qc.ca>.
I've worked with multiple (4-5) instances of turbine on a same server
without any hitches.

I don't know much of the log config with turbine, but I would suspect that
it gets run through a velocity engine to replace applicationRoot by the
the path to your webapp.

What version of tomcat are you using?

sv

On Wed, 31 Mar 2004, Edmund Urbani wrote:

>
> Has anyone tried running 2 turbine-2.3 webapps in the same servlet
> container - both using log4j?
> When I do that, both webapps write to the same logfiles:
>
> there's
> $WEBAPPS/webapp1/logs/
> and
> $WEBAPPS/webapp2/logs/
>
> The appenders are configured like this:
> log4j.appender.turbine = org.apache.log4j.FileAppender
> log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
> log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
> log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
> log4j.appender.turbine.append = false
>
> Both webapps write their log to:
> $WEBAPPS/webapp1/logs/turbine.log
>
> The directory $WEBAPPS/webapp2/logs/ remains empty.
> It seems the ${applicationRoot} variable gets set to $WEBAPPS/webapp1
> for both webapps.
> I am not sure whether this is actually a turbine problem, or a
> tomcat-classloader issue or
> something with log4j itself, because I don't know how that variable gets
> expanded.
> Any ideas?
>
> Cheers,
>  Edmund
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org