struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giovanni Azua <g...@imc.nl>
Subject logging issue (S2.1.x)
Date Wed, 02 Jul 2008 12:43:20 GMT
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


Mime
View raw message