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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to