logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Kjome" <h...@visi.com>
Subject Re: logging from another class
Date Tue, 14 Apr 2009 22:10:29 GMT
You need to call logger.log() and pass in the fully qualified name of the Util 
class with a "." appended to it.

Jake


On Tue, 14 Apr 2009 23:01:19 +0200
  Andy Rozman <andy@triera.net> wrote:
> Hi !
> 
> I already asked this question once, but there were no answers then, I hope 
>there will be one now... I have several classes which need to use logger. 
>Theretically I could instantiate it in each class, but problem is that this 
>message must also be used in some other module (log must be displayed in my 
>swing applciation). So I wanted to create Util class which will a) write into 
>log b) send info to swing application. Problem is that when I do that, I get 
>that log message was created in this Util class. I need to know name and line 
>of class that called this Util class, how could this be done? Is there 
>possibility to do that?
> 
> Take care,
> Andy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


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


Mime
View raw message