Re: disable logging
"Jonathan Revusky" <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
You could always just comment out the lines that are producing the excessive logging in the freemarker source and rebuild the freemarker.jar, On Thu, Aug 14, 2008 at 2:43 PM, Gabriel Luhers Graça <[email protected]> wrote: > Hi all, > > I'm using freemarker along with struts2 and can't turn off the enormous stack traces that are printed on stdout. > > My code goes like this: > > freemarker.log.Logger.selectLoggerLibrary(freemarker.log.Logger.LIBRARY_NONE); > Configuration cfg= new Configuration(); > cfg.setObjectWrapper(new DefaultObjectWrapper()); > cfg.setTemplateExceptionHandler(TemplateExceptionHandler.IGNORE_HANDLER); > Template template=new Template("modelo", new java.io.StringReader(buffer.toString()), cfg); > Writer out=new StringWriter(); > Map root=criarVariaveis(); > template.process(root, out); > out.flush(); > > I thought the first line would do the trick, but it doesn't have any effect. > > I would also like to leave the offending expressions on the processed document, but I've found no simple to way to extract it from the exceptions (except for extricating from the message string with a regex). Is there a simpler way? > > Thanks, > > Gabriel. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > FreeMarker-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/freemarker-user > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/