Aurther send this to me and asked me to send it to the list.

---------- Forwarded message ----------
From: Arthur Brown <[EMAIL PROTECTED]>
Date: Mon, 21 Mar 2005 16:26:13 +0100 (MET)
Subject: Re: Filter on logger
To: James Stauffer <[EMAIL PROTECTED]>


I guess not.
Moreover, from performance considerations I would like
to filter LoggingEvents event without events creation.

Example:

my filter is
MDC.get("foo") == "bar"

so, the statement
log.debug("baz")

should be filtered for all users except from user "1234567890"
without creation of LoggingEvent.

Background:
if I turn on the logging for one package
environment of 100,000 users
5 function per request,
each function has 2 logging statements
then the amount of created LoggingEvent would be

100,000 * 5 * 2 = 1,000,000

>From those LoggingEvents only 10 LoggingEvents
(those for user "1234567890") are actually logged.

Possible solution would be to define Logger Filter,
and try to filter the LoggingEvent (if possible) first,
without LoggingEven creation.

Another alternative in this case would be to hack
the Logger-Class: Use Delegation-Logger on the Session level.
Penalty here : I would need 100,000 different Loggers for the same
Package [for example with suffix "_" + MDC.get("foo")].
Only one logger would actually log.

Comments here?

Regards
Arthur Brown


> Is it possible to set a filter on a logger?  I see that I can do it on
> an appender but I would like to do it on the logger instead of the 3
> appenders that get logs from that one logger.
> --
> James Stauffer
> http://www.geocities.com/stauffer_james/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--
"Happy ProMail" bis 24. März: http://www.gmx.net/de/go/promail
Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos!


-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

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

Reply via email to