logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raúl Carazo <rcar...@bilbomatica.es>
Subject Re: New filter
Date Thu, 01 Aug 2002 09:45:16 GMT

----- Original Message -----
From: "Ceki Gülcü" <ceki@qos.ch>
To: "Log4J Users List" <log4j-user@jakarta.apache.org>
Sent: Thursday, August 01, 2002 11:30 AM
Subject: Re: New filter


At 11:21 01.08.2002 +0200, Raúl Carazo wrote:
> >At 09:36 01.08.2002 +0200, you wrote:
> >>     I'm using log4J 1.2.5 and I'm trying to create a filter for some
> >> information. But I have a question.
> >>
> >>     I'm using the LoggingEvent class, and I've seen a field inside
> >> (logger) that returns a Category object.
> >>
> >>     I think it's the Category that called the log, isn't it? But I
can't
> >> take some information that I've set inside the Logger object...
> >
> >You are using a derived Logger class?
> >
> >>     Any idea?
> >>-----------------------------------------------------------------
> >>Raúl Carazo ( rcarazo@bilbomatica.es )
> >
> >--
> >Ceki
>
>Yes, I've created an extension of Logger with a protected field.
>Then, in the decide method of my filter, I want to see this field for
>testing its value, but it seem it doesn't work... I think I'm doing
>somethig wrong...!

Have you tried using the MDC instead?

Yes. My problem is that if I use MDC, I need to set the value in the Login
process. I use the following code:

    MDC.remove(key);
    MDC.put(key, value);

    But I have problems with several simoultaneous accesses.

>TIA

--
Ceki


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message