You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Giovanni Azua <gi...@imc.nl> on 2008/07/02 14:43:20 UTC

logging issue (S2.1.x)

hi,

Having configured my Web Server (e.g. Apache Tomcat or MyEclipse Tomcat) 
to the default Java Logging, I get the desired logging behavior for my 
Struts 2 app.

After customizing the theme css_xhtml  I get tons of DEBUG logging even 
though my level is set to SEVERE e.g.
DEBUG   12150   [freemark] (): 
template/xhtml/tooltip.ftl[en_US,UTF-8,parsed] cached copy not yet 
stale; using cached.
DEBUG   12150   [freemark] (): 
template/simple/text.ftl[en_US,UTF-8,parsed] cached copy not yet stale; 
using cached.
DEBUG   12150   [freemark] (): 
template/simple/css.ftl[en_US,UTF-8,parsed] cached copy not yet stale; 
using cached.
DEBUG   12150   [freemark] (): 
template/simple/scripting-events.ftl[en_US,UTF-8,parsed] cached copy not 
yet stale; using cached.
DEBUG   12150   [freemark] (): 
template/simple/common-attributes.ftl[en_US,UTF-8,parsed] cached copy 
not yet stale; using cached.

Somehow the default Freemarker Logging discovery does not work (depends 
on the indeterministic class loading) and the only way to fix this, is 
to have one of my ServletContextListener implementations doing a:

// disable Freemarker logging SAGOPT-216
try
{
    // not flexible nor beautiful
    freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_JAVA);
}
catch (ClassNotFoundException anException)
{
    throw new RuntimeException(anException);
}

As an user I would say that the Struts framework is responsible to 
guarantee a consistent logging, including all of its dependencies ...

Shall I open a ticket in Struts for this? so that Struts would configure 
Freemarker to the correct setting? maybe is a Freemarker bug ... this 
does not work:
freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_AUTO);

Best regards,
Giovanni







---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: logging issue (S2.1.x)

Posted by Musachy Barroso <mu...@gmail.com>.
I meant "log level".

musachy

On Thu, Jul 3, 2008 at 11:43 AM, Musachy Barroso <mu...@gmail.com> wrote:
> You can provide freemarker settings by adding a
> "freemarker.properties" file to your classpath. I am guessing that you
> could set the debug level for freemarker there.
>
> musachy
>
> On Wed, Jul 2, 2008 at 8:43 AM, Giovanni Azua <gi...@imc.nl> wrote:
>> hi,
>>
>> Having configured my Web Server (e.g. Apache Tomcat or MyEclipse Tomcat) to
>> the default Java Logging, I get the desired logging behavior for my Struts 2
>> app.
>>
>> After customizing the theme css_xhtml  I get tons of DEBUG logging even
>> though my level is set to SEVERE e.g.
>> DEBUG   12150   [freemark] ():
>> template/xhtml/tooltip.ftl[en_US,UTF-8,parsed] cached copy not yet stale;
>> using cached.
>> DEBUG   12150   [freemark] (): template/simple/text.ftl[en_US,UTF-8,parsed]
>> cached copy not yet stale; using cached.
>> DEBUG   12150   [freemark] (): template/simple/css.ftl[en_US,UTF-8,parsed]
>> cached copy not yet stale; using cached.
>> DEBUG   12150   [freemark] ():
>> template/simple/scripting-events.ftl[en_US,UTF-8,parsed] cached copy not yet
>> stale; using cached.
>> DEBUG   12150   [freemark] ():
>> template/simple/common-attributes.ftl[en_US,UTF-8,parsed] cached copy not
>> yet stale; using cached.
>>
>> Somehow the default Freemarker Logging discovery does not work (depends on
>> the indeterministic class loading) and the only way to fix this, is to have
>> one of my ServletContextListener implementations doing a:
>>
>> // disable Freemarker logging SAGOPT-216
>> try
>> {
>>   // not flexible nor beautiful
>>   freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_JAVA);
>> }
>> catch (ClassNotFoundException anException)
>> {
>>   throw new RuntimeException(anException);
>> }
>>
>> As an user I would say that the Struts framework is responsible to guarantee
>> a consistent logging, including all of its dependencies ...
>>
>> Shall I open a ticket in Struts for this? so that Struts would configure
>> Freemarker to the correct setting? maybe is a Freemarker bug ... this does
>> not work:
>> freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_AUTO);
>>
>> Best regards,
>> Giovanni
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: logging issue (S2.1.x)

Posted by Giovanni Azua <gi...@imc.nl>.
thanks! :)

Musachy Barroso wrote:
> You can provide freemarker settings by adding a
> "freemarker.properties" file to your classpath. I am guessing that you
> could set the debug level for freemarker there.
>
> musachy
>
> On Wed, Jul 2, 2008 at 8:43 AM, Giovanni Azua <gi...@imc.nl> wrote:
>   
>> hi,
>>
>> Having configured my Web Server (e.g. Apache Tomcat or MyEclipse Tomcat) to
>> the default Java Logging, I get the desired logging behavior for my Struts 2
>> app.
>>
>> After customizing the theme css_xhtml  I get tons of DEBUG logging even
>> though my level is set to SEVERE e.g.
>> DEBUG   12150   [freemark] ():
>> template/xhtml/tooltip.ftl[en_US,UTF-8,parsed] cached copy not yet stale;
>> using cached.
>> DEBUG   12150   [freemark] (): template/simple/text.ftl[en_US,UTF-8,parsed]
>> cached copy not yet stale; using cached.
>> DEBUG   12150   [freemark] (): template/simple/css.ftl[en_US,UTF-8,parsed]
>> cached copy not yet stale; using cached.
>> DEBUG   12150   [freemark] ():
>> template/simple/scripting-events.ftl[en_US,UTF-8,parsed] cached copy not yet
>> stale; using cached.
>> DEBUG   12150   [freemark] ():
>> template/simple/common-attributes.ftl[en_US,UTF-8,parsed] cached copy not
>> yet stale; using cached.
>>
>> Somehow the default Freemarker Logging discovery does not work (depends on
>> the indeterministic class loading) and the only way to fix this, is to have
>> one of my ServletContextListener implementations doing a:
>>
>> // disable Freemarker logging SAGOPT-216
>> try
>> {
>>   // not flexible nor beautiful
>>   freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_JAVA);
>> }
>> catch (ClassNotFoundException anException)
>> {
>>   throw new RuntimeException(anException);
>> }
>>
>> As an user I would say that the Struts framework is responsible to guarantee
>> a consistent logging, including all of its dependencies ...
>>
>> Shall I open a ticket in Struts for this? so that Struts would configure
>> Freemarker to the correct setting? maybe is a Freemarker bug ... this does
>> not work:
>> freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_AUTO);
>>
>> Best regards,
>> Giovanni
>>
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
>>     
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: logging issue (S2.1.x)

Posted by Musachy Barroso <mu...@gmail.com>.
You can provide freemarker settings by adding a
"freemarker.properties" file to your classpath. I am guessing that you
could set the debug level for freemarker there.

musachy

On Wed, Jul 2, 2008 at 8:43 AM, Giovanni Azua <gi...@imc.nl> wrote:
> hi,
>
> Having configured my Web Server (e.g. Apache Tomcat or MyEclipse Tomcat) to
> the default Java Logging, I get the desired logging behavior for my Struts 2
> app.
>
> After customizing the theme css_xhtml  I get tons of DEBUG logging even
> though my level is set to SEVERE e.g.
> DEBUG   12150   [freemark] ():
> template/xhtml/tooltip.ftl[en_US,UTF-8,parsed] cached copy not yet stale;
> using cached.
> DEBUG   12150   [freemark] (): template/simple/text.ftl[en_US,UTF-8,parsed]
> cached copy not yet stale; using cached.
> DEBUG   12150   [freemark] (): template/simple/css.ftl[en_US,UTF-8,parsed]
> cached copy not yet stale; using cached.
> DEBUG   12150   [freemark] ():
> template/simple/scripting-events.ftl[en_US,UTF-8,parsed] cached copy not yet
> stale; using cached.
> DEBUG   12150   [freemark] ():
> template/simple/common-attributes.ftl[en_US,UTF-8,parsed] cached copy not
> yet stale; using cached.
>
> Somehow the default Freemarker Logging discovery does not work (depends on
> the indeterministic class loading) and the only way to fix this, is to have
> one of my ServletContextListener implementations doing a:
>
> // disable Freemarker logging SAGOPT-216
> try
> {
>   // not flexible nor beautiful
>   freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_JAVA);
> }
> catch (ClassNotFoundException anException)
> {
>   throw new RuntimeException(anException);
> }
>
> As an user I would say that the Struts framework is responsible to guarantee
> a consistent logging, including all of its dependencies ...
>
> Shall I open a ticket in Struts for this? so that Struts would configure
> Freemarker to the correct setting? maybe is a Freemarker bug ... this does
> not work:
> freemarker.log.Logger.selectLoggerLibrary(Logger.LIBRARY_AUTO);
>
> Best regards,
> Giovanni
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org