You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Chris Kimpton <ki...@yahoo.com> on 2002/04/01 23:35:36 UTC
Re: Using current Torque with Jetspeed - log4j problem- proposed solution
Hi,
--- Chris Kimpton <ki...@yahoo.com> wrote:
> I have had to add a log4j.properties file covering the stratum,
> torque and fulcrum appenders - this doesn't sound right - but maybe
> this is the first time several disparate log4j-using components
> have
> been used together?
>
The logical solution to this seems to be to extend the turbine-2
Log4JavaLogger to provide appenders for torque, fulcrum and stratum.
Thus I propose to extend the LoggingConfig to have a couple more
properties to configure the logging facility:
..category - set to nothing to use the root category - which is
probably all that will make the above work together
..layout - class to use for layout
..layout.pattern - patten to use for layout (if PatternLayout)
..append - true/false - whether the log file is appended to or
started from afresh
So - the changes will affect TR.props, PropertiesLoggingConfig,
LoggingConfig and Log4JavaLogger.
Does this sound like the correct way to solve this problem?
Regards,
Chris
=====
------------------------------------------
http://www.soccer2002.org.uk
__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [PATCH] Re: Using current Torque with Jetspeed - log4j problem- proposed solution
Posted by Eric Dobbs <er...@dobbse.net>.
applied. Thanks.
Chris, would you mind taking a crack at some tests for these
additions? We're a little thin on tests in the T2 codebase
and you did a nice job in the patches to stratum.
Thanks again.
-Eric
On Tuesday, April 2, 2002, at 02:05 PM, Chris Kimpton wrote:
> I chose to effectively backport what
> torque and fulcrum do, that is, use log4j properties directly, for
> example:
>
> # An example configuration for using Log4Java, with log4j properties
> inline
> # The category name - at the end of this line - needs to match the
> logging facility name - the first log4j.
> # need this rootCategory entry to capture the torque/fulcrum etc
> logging
> services.LoggingService.logforj.log4j.rootCategory = DEBUG, logforj
> # need this category entry for the actual jetspeed logging (I don't
> know why it doesn't get covered by the root category!)
> services.LoggingService.logforj.log4j.category.logforj = DEBUG,
> logforj
> services.LoggingService.logforj.log4j.appender.logforj.file
> =${webappRoot}/WEB-INF/log/jetspeed_log4j.log
> services.LoggingService.logforj.log4j.appender.logforj =
> org.apache.log4j.FileAppender
> services.LoggingService.logforj.log4j.appender.logforj.layout =
> org.apache.log4j.PatternLayout
> services.LoggingService.logforj.log4j.appender.logforj.layout.conversionPattern
> = [%d{ABSOLUTE} %-5p] %m%n
> services.LoggingService.logforj.log4j.appender.logforj.append = false
> services.LoggingService.logforj.className=org.apache.turbine.services.logging.
> Log4JavaLogger
> services.LoggingService.logforj.level=DEBUG
>
> This gives the full flexibility of log4j - in particular allows for
> merging the torque et al logs into one, while keeping the turbine
> TR.props configuration of it.
>
> This patch relies on the stratum patches submitted earlier - in
> particular for the interpolate additions relating to getStringArray
> and subset.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
[PATCH] Re: Using current Torque with Jetspeed - log4j problem- proposed solution
Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,
>
> --- Chris Kimpton <ki...@yahoo.com> wrote:
> > I have had to add a log4j.properties file covering the stratum,
> > torque and fulcrum appenders - this doesn't sound right - but
> maybe
> > this is the first time several disparate log4j-using components
> > have
> > been used together?
> >
>
> The logical solution to this seems to be to extend the turbine-2
> Log4JavaLogger to provide appenders for torque, fulcrum and
> stratum.
>
> Thus I propose to extend the LoggingConfig to have a couple more
> properties to configure the logging facility:
>
> ..category - set to nothing to use the root category - which is
> probably all that will make the above work together
>
> ..layout - class to use for layout
>
> ..layout.pattern - patten to use for layout (if PatternLayout)
>
> ..append - true/false - whether the log file is appended to or
> started from afresh
>
> So - the changes will affect TR.props, PropertiesLoggingConfig,
> LoggingConfig and Log4JavaLogger.
>
> Does this sound like the correct way to solve this problem?
>
Attached is the patch for this. I chose to effectively backport what
torque and fulcrum do, that is, use log4j properties directly, for
example:
# An example configuration for using Log4Java, with log4j properties
inline
# The category name - at the end of this line - needs to match the
logging facility name - the first log4j.
# need this rootCategory entry to capture the torque/fulcrum etc
logging
services.LoggingService.logforj.log4j.rootCategory = DEBUG, logforj
# need this category entry for the actual jetspeed logging (I don't
know why it doesn't get covered by the root category!)
services.LoggingService.logforj.log4j.category.logforj = DEBUG,
logforj
services.LoggingService.logforj.log4j.appender.logforj.file
=${webappRoot}/WEB-INF/log/jetspeed_log4j.log
services.LoggingService.logforj.log4j.appender.logforj =
org.apache.log4j.FileAppender
services.LoggingService.logforj.log4j.appender.logforj.layout =
org.apache.log4j.PatternLayout
services.LoggingService.logforj.log4j.appender.logforj.layout.conversionPattern
= [%d{ABSOLUTE} %-5p] %m%n
services.LoggingService.logforj.log4j.appender.logforj.append = false
services.LoggingService.logforj.className=org.apache.turbine.services.logging.Log4JavaLogger
services.LoggingService.logforj.level=DEBUG
This gives the full flexibility of log4j - in particular allows for
merging the torque et al logs into one, while keeping the turbine
TR.props configuration of it.
This patch relies on the stratum patches submitted earlier - in
particular for the interpolate additions relating to getStringArray
and subset.
Regards,
Chris
=====
------------------------------------------
http://www.soccer2002.org.uk
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/