Dave,

Try adding the line below to your config file:
log4j.additivity.umn.edu.cidrap.admin.ContentBean=false

It appears that your logger is inheriting the root's config (see the additivity 
section in the log4j doc).

Hope that helps,
Manish






"Dave Bender" <[EMAIL PROTECTED]> on 04/02/2002 04:17:25 PM

Please respond to "Log4J Users List" <[EMAIL PROTECTED]>

To:   <[EMAIL PROTECTED]>
cc:

Subject:  newbie: trouble making sub category log differently


I must be missing something obvious, but I cannot get a Category of mine to
log to a location other than that of the rootCategory. Can someone point
out
what I'm missing?

The behaviour I'd like is for all loggers to output to a file, except for
one category, which should log to the console. I've defined "A1" and "A2"
as
my appenders and both are functional, in that if I assign the root category
to go there, everything goes where it's instructed to go.

But if I assign my category, umn.edu.cidrap.admin.ContentBean, to use one
or
the other or both, it doesn't. The output goes where the rootCategory is
defined to go.

Any help would be appreciated. I think I've covered all the documentation,
but if it's there, I'm not seeing it.

Dave Bender




# define which appenders to use for our categories/loggers
log4j.rootCategory=DEBUG, A1
log4j.category.umn.edu.cidrap.admin.ContentBean=, A2


# A1 is set to be a ConsoleAppender which outputs to System.out.
log4j.appender.A2=org.apache.log4j.ConsoleAppender

log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=log4j-test.log


# A1 uses PatternLayout; so does A2
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout=org.apache.log4j.PatternLayout

# The conversion pattern uses format specifiers. Both the same.
log4j.appender.A1.layout.ConversionPattern=%-4r %-5p [%t] %37c %3x - %m%n
log4j.appender.A2.layout.ConversionPattern=%-4r %-5p [%t] %37c %3x - %m%n





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








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

Reply via email to