myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <simon.kitch...@chello.at>
Subject Re: changing myfaces loglevel to debug causes different behavior
Date Mon, 11 Feb 2008 12:03:26 GMT
---- Michael Heinen <mhn@recommind.com> schrieb:
> I noticed today strange behavior if I change the loglevel for myfaces.
> 
> Some getters of my backing beans are called although the rendered
> attribute of a parent component is false.
> 
> It is caused by class DebugUtils.traceView.
> 
>  
> 
> I enabled logging via following setting:
> 
> log4j.logger.org.apache.myfaces=DEBUG

Yep, that will happen. The DebugUtils class is explicitly trying to dump out a helpful list
of all the components and all their settings. And to do that, it has to call the getters for
the attributes.

> Lazy initialization etc are done, model is not fully initialized and
> other ugly sideeffects occur ...

I don't see why invoking attribute getters should break an application.

But you can always disable just this functionality while leaving other debugging enabled:

log4j.logger.org.apache.myfaces.util.DebugUtils=INFO

BTW, log4j xml configuration is much nicer than props syntax..

Regards, Simon

Mime
View raw message