Sunil,

If you compile with OFF, isLoggingEnabled() will always return false.

If you compile at any other level, then:
- if the current (runtime) log level is OFF, isLoggingEnabled() will return
false
- if the current (runtime) log level is any other value, isLoggingEnabled()
will return true

In your case (compiled level = DEBUG and runtime level = INFO),
isLoggingEnabled() will return true.

Fred Sauer
[EMAIL PROTECTED]


On Fri, Sep 5, 2008 at 8:00 AM, Sunil <[EMAIL PROTECTED]> wrote:

>
>
>
> On Sep 4, 9:01 pm, "Fred Sauer" <[EMAIL PROTECTED]> wrote:
> > Sunil,
> >
> > Fred Sauer
> > [EMAIL PROTECTED]
> >
> > On Thu, Sep 4, 2008 at 2:34 PM, Sunil <[EMAIL PROTECTED]> wrote:
> >
> > > Excellent tool.
> >
> > Thanks
> >
> > - Which loggers are enabled by default, and which are not? I noticed
> >
> > > that the WindowLogger is not enabled by default. It would be great to
> > > add this to the documentation.
> >
> > I added a note about the WindowLogger to the getting started wiki:
> >    http://code.google.com/p/gwt-log/wiki/GettingStarted
> >
> > Also added a note showing which loggers are activate by default.
>
> That's great. Thanks for the quick response.
>
> >
> > - The Log.isLoggingEnabled method, returns true only if the log_level
> >
> > > is DEBUG. I would have expected it to return true even if ERROR is
> > > enabled for instance. Is there any method which can check if logging
> > > is enabled in general at runtime or not?
> >
> > It shouldn't work that way. When the log level is anything but OFF, the
> > implementation is:
> >   public final boolean isLoggingEnabled() {
> >     return getLowestLogLevel() != Log.LOG_LEVEL_OFF &&
> getCurrentLogLevel()
> > != Log.LOG_LEVEL_OFF;
> >   }
> >
>
> I guess I am seeing this because I misunderstood the logging levels.
> I was assuming that if I compiled at DEBUG level, it would
> automatically include levels below it.
> I compiled for DEBUG, and set the runtime log_level to INFO. Then if I
> call isLoggingEnabled(), it returns false.
>
> Does this mean that there is no inherent hierarchy in the levels like
> log4j has, and that I have to specify compilation for all levels that
> I need?
>
> >
> >
> > > Thanks
> > > Sunil.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"gwt-log" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/gwt-log?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to