On May 12, 2006, at 1:53 AM, Shiby Maria John wrote:

Hi,

I have a framework that implements the logging by log4j.
Now my classes need to log using this and I need to print the line
number from where the log originally originated from.

...

11 :  public void debug(String message) {
12 :        cat.debug(message);
13 :  }



Is there any way to acheive this??

Thanks in advance,
Shiby


Make the body of the methods something like:

public class Logger {
   private static final className = Logger.class.getName();
   ...

  public void debug(String message) {
       if (cat.isDebugEnabled()) {
          cat.forcedLog(className, Level.DEBUG, message);
      }
  }
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to