Van
        In this case
        You could instantiate two instances of outputA
        Therefore you could have

log4j.category.categoryA=DEBUG, outputA_1, outputB
log4j.category.categoryB=INFO, outputA_2

        I think this should work.
Anshul

-----Original Message-----
From: Veerappan Saravanan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 5:18 PM
To: 'LOG4J Users Mailing List'
Subject: RE: One category, different priorities, different outputs


Anshul,

Sorry for the incomplete details, Threshold option will not work because I
have another category that also wants to log to this outputA, all messages
that are with priority info or higher.

For example,

log4j.category.categoryA=ERROR, outputA
log4j.category.categoryA=DEBUG, outputB
log4j.category.categoryB=INFO, outputA

Now, if I put an ERROR threshold on outputA and change the properties like
shown below

log4j.category.categoryA=DEBUG, outputB, outputA
log4j.category.categoryB=INFO, outputA

then all my messages from categoryB will not be output to outputA because of
the ERROR threshold.

I also briefly looked into the implementation of the Category class, It
looks like what I want is not possible.  I could be wrong, since I don't
know all that's going on inside log4j.

Anyone, any thoughts on this?

Thanks
Van



-----Original Message-----
From: Anshul Chhabra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 1:00 PM
To: LOG4J Users Mailing List
Subject: RE: One category, different priorities, different outputs


Van
        Have you considered using Thresholds for appenders? Looks to me like
that
might solve your problem.

Anshul

-----Original Message-----
From: Veerappan Saravanan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 4:30 PM
To: '[EMAIL PROTECTED]'
Subject: One category, different priorities, different outputs


I have a category 'categoryA' that needs to log to different outputs based
on their priority. The following piece of code doesn't work

log4j.category.categoryA=ERROR, outputA
log4j.category.categoryA=DEBUG, outputB

The second line overwrites the previous line, so the previous line is not
considered at all.

I need a way to output to outputB if the priority is greater than debug and
to outputA and outputB if the priority is greater than error.

Can somebody tell me how to accomplish this.

Thanks in advance.
Van

---------------------------------------------------------------------
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]

---------------------------------------------------------------------
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