ing") and it does the trick. That way I can just
> > > replace
> > > All the logger with LogUtil :)
> > >
> > > Thanks again for your help!
> > >
> > >
> > > - Original Message
> > > From: Robert Pepersack <
To: Log4J Users List
Sent: Friday, April 4, 2008 12:14:30 PM
Subject: Re: Log Utility
Hi Tim,
The Logger class has a way of checking the level first.
First put this in your instance variables:
private static final Logger logger =
Logger.getLogger("my.package.MyClass");
pri
EMAIL PROTECTED]>
> To: Log4J Users List
> Sent: Friday, April 4, 2008 12:14:30 PM
> Subject: Re: Log Utility
>
> Hi Tim,
>
> The Logger class has a way of checking the level first.
>
> First put this in your instance variables:
>
> private static final L
ay, April 04, 2008 1:44 PM
> To: Log4J Users List
> Subject: Re: Log Utility
>
> The Logger.isDebugEnabled() method applies to all of the classes that use your
> configured log4j repository. If you have your all of your loggers set to
> DEBUG,
> then Logger.isDebugEnabled() wil
rom: Robert Pepersack <[EMAIL PROTECTED]>
To: Log4J Users List
Sent: Friday, April 4, 2008 12:14:30 PM
Subject: Re: Log Utility
Hi Tim,
The Logger class has a way of checking the level first.
First put this in your instance variables:
private static final Logger logger = Logger.getLogger
gUtil (e.g: LogUtil.debug("String") and it
does the trick. That way I can just replace All the logger with LogUtil :)
Thanks again for your help!
- Original Message
From: Robert Pepersack <[EMAIL PROTECTED]>
To: Log4J Users List
Sent: Friday, April 4, 2008 12:14:30 PM
Subject: Re:
Hi Tim,
The Logger class has a way of checking the level first.
First put this in your instance variables:
private static final Logger logger = Logger.getLogger("my.package.MyClass");
private final boolean debug = logger.isDebugEnabled();
Then put this in your method:
if (this