YOu can get it from the locationInfo (see PatternLayout for an example), but
it's slow.  You can say what method it is in your log message, but that's
hard to maintain.  You could use AspectJ, but that's a (semi-)complicated
pre-processor.


-----Original Message-----
From: Chintu Sankar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 4:54 PM
To: [EMAIL PROTECTED]
Subject: Find the method name


Hi,
I am using log4j and created my own utility class to
log the messages.How can I find the method name of the
method in which I am doing logging?Is there any
package which gives you the method name. Any example
code??
Thanks
Chintu

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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