logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: How to get Method Name and Class Name
Date Wed, 30 Apr 2003 12:10:32 GMT

Sorry for the mess below.

The signature is:

log(String callerFQCN, Priority level, Object message, Throwable t)

At 01:49 PM 4/30/2003 +0200, you wrote:
>Debasis,
>
>Actually you can. In your wrapper class you have to call the log method of 
>Logger (or Category) taking the caller's fully qualified class name.
>
>The signature is:
>
><../../../org/apache/log4j/Category.htm#log(java.lang.String, 
>org.apache.log4j.Priority, java.lang.Object, 
>java.lang.Throwable)>log(<http://java.sun.com/products/jdk/1.3/docs/api/java/lang/String.html>String

>callerFQCN, <../../../org/apache/log4j/Priority.htm>Priority level, 
><http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Object.html>Object 
>  message, 
><http://java.sun.com/products/jdk/1.3/docs/api/java/lang/Throwable.html>Throwable

>t)
>
>Try it.
>
>At 04:28 PM 4/30/2003 +0530, you wrote:
>>Hi,
>>    I want to display method name and class name in the log output. Since
>>I am using a wrapper class over log4j's logger class, I can't use the
>>default conversion pattern.
>>Appriciate any help.
>>
>>Thanks
>>Debasis
>
>--
>Ceki  For log4j documentation consider "The complete log4j manual"
>       http://www.qos.ch/shop/products/clm_t.jsp
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>

--
Ceki  For log4j documentation consider "The complete log4j manual"
       http://www.qos.ch/shop/products/clm_t.jsp 


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


Mime
View raw message