From: Tim P <ti...@us...> - 2010-02-24 21:02:47
|
Update of /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30233/src/main/java/org/webmacro/engine Modified Files: Block.java CrankyEvaluationExceptionHandler.java DebugEvaluationExceptionHandler.java DefaultEvaluationExceptionHandler.java ParserProvider.java PropertyOperatorCache.java WMTemplate.java Log Message: Remove logging Index: WMTemplate.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine/WMTemplate.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** WMTemplate.java 20 Feb 2009 13:37:55 -0000 1.54 --- WMTemplate.java 24 Feb 2010 21:02:09 -0000 1.55 *************** *** 30,37 **** import java.util.Map; import org.webmacro.Broker; import org.webmacro.Context; import org.webmacro.FastWriter; - import org.webmacro.Log; import org.webmacro.PropertyException; import org.webmacro.Template; --- 30,39 ---- import java.util.Map; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + import org.webmacro.Broker; import org.webmacro.Context; import org.webmacro.FastWriter; import org.webmacro.PropertyException; import org.webmacro.Template; *************** *** 63,66 **** --- 65,69 ---- { + static Logger _log = LoggerFactory.getLogger(WMTemplate.class); /** * The resource broker used to resolve things in this template. *************** *** 69,77 **** /** - * Where we log our errors. - */ - final protected Log _log; - - /** * Whether template has already been parsed. */ --- 72,75 ---- *************** *** 116,120 **** _broker = broker; _parserName = parserName; - _log = broker.getLog("template", "template lifecycle"); } --- 114,117 ---- *************** *** 346,350 **** String warning = "Template: Exception evaluating template " + this; ! _log.warning(warning, e); out.write(context.getEvaluationExceptionHandler() --- 343,347 ---- String warning = "Template: Exception evaluating template " + this; ! _log.warn(warning, e); out.write(context.getEvaluationExceptionHandler() Index: Block.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine/Block.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Block.java 20 Mar 2008 22:45:29 -0000 1.28 --- Block.java 24 Feb 2010 21:02:07 -0000 1.29 *************** *** 27,30 **** --- 27,32 ---- import java.util.List; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; import org.webmacro.Context; import org.webmacro.FastWriter; *************** *** 43,46 **** --- 45,50 ---- { + static Logger _log = LoggerFactory.getLogger(Block.class); + private final String[] _strings; private final Macro[] _macros; *************** *** 344,350 **** catch (IOException e) { ! context.getBroker().getLog("engine", ! "parsing and template execution") ! .error("StringWriter threw an IOException!", e); return null; } --- 348,352 ---- catch (IOException e) { ! _log.error("StringWriter threw an IOException!", e); return null; } Index: DebugEvaluationExceptionHandler.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine/DebugEvaluationExceptionHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DebugEvaluationExceptionHandler.java 20 Mar 2008 11:16:07 -0000 1.9 --- DebugEvaluationExceptionHandler.java 24 Feb 2010 21:02:07 -0000 1.10 *************** *** 24,30 **** package org.webmacro.engine; import org.webmacro.Broker; import org.webmacro.Context; - import org.webmacro.Log; import org.webmacro.PropertyException; import org.webmacro.util.Settings; --- 24,31 ---- package org.webmacro.engine; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; import org.webmacro.Broker; import org.webmacro.Context; import org.webmacro.PropertyException; import org.webmacro.util.Settings; *************** *** 63,67 **** { ! private Log _log; public DebugEvaluationExceptionHandler () --- 64,68 ---- { ! static Logger _log = LoggerFactory.getLogger(DebugEvaluationExceptionHandler.class); public DebugEvaluationExceptionHandler () *************** *** 76,80 **** public void init (Broker b, Settings config) { - _log = b.getLog("engine"); } --- 77,80 ---- *************** *** 130,134 **** if (_log != null) { ! _log.warning(strError, propEx); } // and rethrow it --- 130,134 ---- if (_log != null) { ! _log.warn(strError, propEx); } // and rethrow it Index: PropertyOperatorCache.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine/PropertyOperatorCache.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** PropertyOperatorCache.java 20 Mar 2008 21:01:48 -0000 1.24 --- PropertyOperatorCache.java 24 Feb 2010 21:02:08 -0000 1.25 *************** *** 36,43 **** import java.util.Vector; import org.webmacro.Broker; import org.webmacro.Context; import org.webmacro.InitException; - import org.webmacro.Log; import org.webmacro.PropertyException; import org.webmacro.resource.CacheManager; --- 36,44 ---- import java.util.Vector; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; import org.webmacro.Broker; import org.webmacro.Context; import org.webmacro.InitException; import org.webmacro.PropertyException; import org.webmacro.resource.CacheManager; *************** *** 58,62 **** private CacheManager _cache; ! private Log _log; private HashMap _restrictedClasses; --- 59,63 ---- private CacheManager _cache; ! static Logger _log = LoggerFactory.getLogger(PropertyOperatorCache.class); private HashMap _restrictedClasses; *************** *** 69,73 **** String cacheManager; - _log = b.getLog("resource", "Object loading and caching"); cacheManager = b.getSetting("PropertyOperator.CacheManager"); --- 70,73 ---- *************** *** 87,91 **** catch (Exception e) { ! _log.warning("Unable to load cache manager " + cacheManager + " for PropertyOperator, using SimpleCacheManager. Reason:\n" + e); _cache = new SimpleCacheManager(); --- 87,91 ---- catch (Exception e) { ! _log.warn("Unable to load cache manager " + cacheManager + " for PropertyOperator, using SimpleCacheManager. Reason:\n" + e); _cache = new SimpleCacheManager(); Index: CrankyEvaluationExceptionHandler.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine/CrankyEvaluationExceptionHandler.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CrankyEvaluationExceptionHandler.java 12 Jun 2003 00:47:45 -0000 1.8 --- CrankyEvaluationExceptionHandler.java 24 Feb 2010 21:02:07 -0000 1.9 *************** *** 24,30 **** package org.webmacro.engine; import org.webmacro.Broker; import org.webmacro.Context; - import org.webmacro.Log; import org.webmacro.PropertyException; import org.webmacro.util.Settings; --- 24,31 ---- package org.webmacro.engine; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; import org.webmacro.Broker; import org.webmacro.Context; import org.webmacro.PropertyException; import org.webmacro.util.Settings; *************** *** 44,50 **** { ! private Log _log; ! public CrankyEvaluationExceptionHandler () { } --- 45,51 ---- { ! static Logger _log = LoggerFactory.getLogger(CrankyEvaluationExceptionHandler.class); ! public CrankyEvaluationExceptionHandler () { } *************** *** 57,61 **** public void init (Broker b, Settings config) { - _log = b.getLog("engine"); } --- 58,61 ---- *************** *** 82,86 **** // log it if (_log != null) ! _log.warning("Error evaluating $" + variable.getVariableName(), problem); --- 82,86 ---- // log it if (_log != null) ! _log.warn("Error evaluating $" + variable.getVariableName(), problem); *************** *** 111,115 **** // log it if (_log != null) ! _log.warning("Error expanding $" + variable.getVariableName(), problem); --- 111,115 ---- // log it if (_log != null) ! _log.warn("Error expanding $" + variable.getVariableName(), problem); Index: ParserProvider.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine/ParserProvider.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ParserProvider.java 19 Mar 2008 09:43:27 -0000 1.12 --- ParserProvider.java 24 Feb 2010 21:02:07 -0000 1.13 *************** *** 28,36 **** import java.util.Hashtable; import org.webmacro.Broker; import org.webmacro.InitException; - import org.webmacro.Log; import org.webmacro.NotFoundException; import org.webmacro.Provider; import org.webmacro.util.Settings; --- 28,39 ---- import java.util.Hashtable; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + import org.webmacro.Broker; import org.webmacro.InitException; import org.webmacro.NotFoundException; import org.webmacro.Provider; + import org.webmacro.util.Instantiator; import org.webmacro.util.Settings; *************** *** 40,43 **** --- 43,47 ---- public final class ParserProvider implements Provider { + static Logger _log = LoggerFactory.getLogger(Instantiator.class); // BULDER CLASS MANAGEMENT *************** *** 46,50 **** private Broker _broker = null; - private Log _log; private final Class[] _brokerParam = {Broker.class}; private final Object[] _brokerArg = new Object[1]; --- 50,53 ---- *************** *** 164,168 **** _brokerArg[0] = broker; _broker = broker; - _log = broker.getLog("engine"); try --- 167,170 ---- Index: DefaultEvaluationExceptionHandler.java =================================================================== RCS file: /cvsroot/webmacro/webmacro/webmacro/src/main/java/org/webmacro/engine/DefaultEvaluationExceptionHandler.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DefaultEvaluationExceptionHandler.java 19 Mar 2008 17:09:28 -0000 1.13 --- DefaultEvaluationExceptionHandler.java 24 Feb 2010 21:02:07 -0000 1.14 *************** *** 24,30 **** package org.webmacro.engine; import org.webmacro.Broker; import org.webmacro.Context; - import org.webmacro.Log; import org.webmacro.PropertyException; import org.webmacro.util.Settings; --- 24,31 ---- package org.webmacro.engine; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; import org.webmacro.Broker; import org.webmacro.Context; import org.webmacro.PropertyException; import org.webmacro.util.Settings; *************** *** 46,50 **** { ! private Log _log; public DefaultEvaluationExceptionHandler () --- 47,51 ---- { ! static Logger _log = LoggerFactory.getLogger(DefaultEvaluationExceptionHandler.class); public DefaultEvaluationExceptionHandler () *************** *** 59,63 **** public void init (Broker b, Settings config) { - _log = b.getLog("engine"); } --- 60,63 ---- |