Hi,

> 
> --- Chris Kimpton <[EMAIL PROTECTED]> 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/

Attachment: log4jprops.diffu
Description: log4jprops.diffu

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to