Sunil,
Since you're compiling with OFF and DEBUG compile time log levels in your
*.gwt.xml file, INFO is not a valid *compile time* log level to pass in the
URL, and it is getting ignored. Instead it is using the default 'OFF'.

I think what you want to do is use DEBUG level in the URL, and then in your
code call Log.setCurrentLogLevel(Log.LOG_LEVEL_INFO). This way you will only
see INFO level messages, although the compiled application is able to
disable DEBUG level ones if you change the current runtime log level.

Fred Sauer
[EMAIL PROTECTED]


On Tue, Sep 9, 2008 at 12:03 PM, Sunil <[EMAIL PROTECTED]> wrote:

>
>
>
> On Sep 5, 9:56 pm, "Fred Sauer" <[EMAIL PROTECTED]> wrote:
> > 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.'
>
> That's not what I am seeing.
>
> The compiled level is DEBUG and OFF, since I have the following code
> in my module.xml
> <inherits name="com.allen_sauer.gwt.log.gwt-log-OFF"/>
> <extend-property name="log_level" values="DEBUG"/>
>
> Then if I launch the GWT with a URL parameter of log_level=DEBUG,
> Log.isLoggingEnabled returns true.
> If I launch with a URL parameter of log_level=INFO, the impl object in
> Log class is of type LogImplOff, which returns false. I am presuming
> that since INFO is a lower level than DEBUG which has been compiled,
> it should be enabled.
>
> Thanks
> Sunil.
>
> >
> > 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