logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: How to reach the info of a logged class ?
Date Thu, 03 Apr 2003 13:46:02 GMT

You could reach it with grep / awk / sed on the log file ;)

The current filter concept in log4j is that you filter logging events,
not appender outputs, in order to stay appender-neutral.  That's why the
method you implement from the log4j Filter declaration is
decide(LoggingEvent event) as opposed to decide(String

Write your filter to handle logging events.  The LoggingEvent instance
has a getLoggerName() method which will return the logger name.  For
most people, this is the full name of the class that generated the
logging event.  Do an indexOf("P") on the logger name to see if it's

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: Abramson, Rami [mailto:rami.abramson@terayon.com]
>Sent: Thursday, April 03, 2003 2:03 AM
>To: Log4j-User (E-mail)
>Subject: How to reach the info of a logged class ?
>Hello all,
>Creating a new customized filter, would like to filter all the
printouts of
>classes from a package P.
>How can I reach this information?
>Would appreciate an answer.
>	thank you,
>              Rami A.
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

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

View raw message