I've had a look but can't get it to work - this doesn't seem to be anywhere
in the docs that describe the legal values in the configuration file -
therefore I've just assumed that they map to the bean properties of the
various classes involved (is this right?).
Based on that I've added the line
log4j.category.mercurylog.additivity=false
Anyway, it still doesn't work (ie the damn output still ends up in all the
appenders)- can anyone spot the mistake????
Here's my config file

 A log4j properties file suitable for replacing the
# default JBoss ConsoleLogging & FileLogging mbeans.

log4j.rootCategory=DEBUG, Default, Console

##JBoss stuff
### The server.log file appender
log4j.appender.Default=org.apache.log4j.FileAppender
log4j.appender.Default.File=../log/server.log
log4j.appender.Default.layout=org.apache.log4j.PatternLayout
# Use the default JBoss format
log4j.appender.Default.layout.ConversionPattern=[%c{1}] %m%n
# Truncate if it aleady exists.
log4j.appender.Default.Append=false
#Example of turning off logging for a category. Uncomment to turn off.
#log4j.category.DefaultDS=FATAL

### The console appender
log4j.appender.Console=org.jboss.logging.log4j.ConsoleAppender
log4j.appender.Console.Threshold=INFO
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%c{1}] %m%n
##End of JBoss stuff


#The mercury logging configuration
log4j.category.mercurylog=DEBUG, MercuryLog
log4j.category.mercurylog.additivity=false

log4j.appender.MercuryLog=org.apache.log4j.RollingFileAppender
log4j.appender.MercuryLog.File=../log/mercury.log
log4j.appender.MercuryLog.layout=org.apache.log4j.PatternLayout
log4j.appender.MercuryLog.layout.ConversionPattern=%d [%t] - %m%n
log4j.appender.MercuryLog.Append=true
log4j.appender.MercuryLog.MaximumFileSize=10000000


-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
Sent: 26 July 2001 21:21
To: LOG4J Users Mailing List
Subject: Re: Stopping root category from logging child categories



Tim,

See appender additivity. It's probably what you want.

At 18:22 26.07.2001 +0100, Tim Fox wrote:
>I'm using log4j with jboss.
>The components in Jboss uses log4j for their logging.
>The log4j.properties is set up with with a root category - so all the
>messages from all the components get logged to that category.
>I have an application running in jboss, and I want to use my own log file -
>moreover I do not want my messages ending up in the jboss log too.
>I have set up my own category and my messages get logged to the fine.
>The pain in arse is that they all go the root category log too!!
>I can't just set the priority of that category to FATAL since then I lose
>all the messages from all the other components.
>Is there any way to tell a category (the root category) to ignore messages
>from specific child categories??
>Please help, this is doing my head in!

--
Ceki Gülcü - http://qos.ch


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


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

Reply via email to