ok, got it, thank you.

one thing for clarification on logLevels and code permutations:
I've used to live with gwt-log for some time, for every logLevel they
do create a new code permutation which optimizes away code on any
other levels, say:

<extend-property name="log_level" values="info, warn"/> would add two
more permutations during compile, one for info the other for warn.
during runtime then I can choose via log_level = info or warn with
which loglevel I want to run my application, I cannot decide to use
another loglevel though, unless previously defined in the module
descriptor. So whilst runtime there is no code for log instructions
other than requested via log_level property.

I suppose it works dynamically in native gwt logging, so loglevel does
not effect code permutation and one has to ensure his log statement is
secured with isLoggable() check.


On 17 Nov., 20:32, Unnur Gretarsdottir <[email protected]> wrote:
> Hi there - answers are inline...
>
> On Wed, Nov 17, 2010 at 4:56 AM, ep <[email protected]> wrote:
> > hello folks,
> > whats the difference between the:
>
> > <set-property name="gwt.logging.logLevel" value="OFF"/>
>
> This will set the Level of the RootLogger to be OFF
>
>
>
> > and
>
> > <set-property name="gwt.logging.enabled" value="FALSE"/>
>
> This will swap in Null Implementations for the logging related
> classes, which will compile out.
>
>
>
> > ?
>
> > I understand I can use LogConfiguration.loggingIsEnabled() to wrap the
> > code I want to optimize away during compilation, but I could also do:
>
> > if(java.util.logging.Logger.isLoggable(Level.INFO)) {
> >  logger.info("this code will be compiled out if logLevel is below
> > requested? complex result: " + doSomeComplexCalc());
> > }
>
> > couldn't I?
>
> Yes - the LogConfiguration method is just something I added for convenience.
>
>
>
> > or, I guess that gwt.logging.logLevel does not effect the compiler, so
> > only gwt.logging.enabled will provide NULL implementation?
>
> Yes - exactly - see my response above
>
>
>
> > what about the loglevels - is there new permutation per each or are
> > logging instructions not inlined during compilation? ( like in gwt-log
> > project )
>
> Not sure exactly what you mean here
>
>
>
> > are there more papers on new logging I can dive in?
>
> > thank you.
>
> Not really, but you can look at the source code - it's actually more
> straightforward than you would think. Note that you'll want to look at
> the both the files in logging, as well as the emulation classes in
> supersource.  However many of the emulated classes just punt out to
> Null or Regular Impl classes, which are in the logging directory.
>
>
>
> > --
> >http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to