struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: logging issue (S2.1.x)
Date Thu, 03 Jul 2008 15:43:02 GMT
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 <giaz@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


Mime
View raw message