logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Rozman <a...@triera.net>
Subject calling logger from one location (method)
Date Wed, 26 Nov 2008 18:06:47 GMT
Hi !

I have one weird request... I would like to call log from one certain
method. Problem is that I need logging output to be sent to my gui as
well as into log file (some logs not all), so I wanted to create method
that would call logger... something like this:

public void writeLog(int type, String msg)
     // some my code

     if (type==DEBUG)
     // some more code and if conditions


Problem is that whenevr I write to log through this method I get as
source this method. Would it be possible to make so, that logger writes
as source originating method.

Thank you for all answers...

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

View raw message