Hi,

I've successfully upgraded to Tools 2.0 and Velocity 1.6.4.

I'm getting confusing logs though, I wish someone could help me understand
them.
First of all, I'm using Velocity in a web environnement as a replacement to
JSPs.

I'm getting the log twice, probably from Velocity, then Tools - isn't it?

Here's the first wave:

DEBUG [main] VelocityEngine.logVelocityMessage:52 | Starting Apache Velocity
v1.6.4 (compiled: 2010-04-27 15:31:23)
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
DEBUG [main] VelocityEngine.logVelocityMessage:52 | LogSystem has been
deprecated. Please use a LogChute implementation. --> I have
runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute
in velocity.properties, as indicated in the documentation. Why this log?
DEBUG [main] VelocityEngine.logVelocityMessage:52 | ResourceLoader
instantiated:
org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
DEBUG [main] VelocityEngine.logVelocityMessage:52 | ResourceCache:
initialized (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
with class java.util.Collections$SynchronizedMap cache map.
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Define
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Break
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Evaluate
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Include
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocity was not
initialized! Calling init()...
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Created '20' parsers.
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocimacro :
allowInline = true : VMs can be defined inline in templates
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocimacro :
allowInlineToOverride = false : VMs defined inline may NOT replace previous
VM definitions
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocimacro :
allowInlineLocal = false : VMs defined inline will be global in scope if
allowed.
DEBUG [main] VelocityEngine.logVelocityMessage:52 | Velocimacro : autoload
off : VM system will not automatically reload global library macros


Second wave gives:

DEBUG [main] velocity.log:168 | Log4JLogChute using logger
'org.apache.velocity'
DEBUG [main] velocity.log:168 | Configuring Velocity with properties at:
/WEB-INF/velocity.properties
DEBUG [main] velocity.log:168 | Configuring Velocity with properties at:
/WEB-INF/velocity.properties -- Why twice?
DEBUG [main] velocity.log:168 | Starting Apache Velocity v1.6.4 (compiled:
2010-04-27 15:31:23)
DEBUG [main] velocity.log:168 | Default Properties File:
org/apache/velocity/runtime/defaults/velocity.properties
DEBUG [main] velocity.log:168 | Trying to use logger class
org.apache.velocity.runtime.log.Log4JLogChute
DEBUG [main] velocity.log:168 | Using logger class
org.apache.velocity.runtime.log.Log4JLogChute
DEBUG [main] velocity.log:168 | ResourceLoader instantiated:
org.apache.velocity.tools.view.WebappResourceLoader
DEBUG [main] velocity.log:168 | ResourceLoader instantiated:
org.apache.velocity.runtime.resource.loader.StringResourceLoader
DEBUG [main] velocity.log:168 | Creating string repository using class
org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl...
DEBUG [main] velocity.log:168 | Default repository encoding is UTF-8
DEBUG [main] velocity.log:168 | ResourceCache: initialized (class
org.apache.velocity.runtime.resource.ResourceCacheImpl) with class
java.util.Collections$SynchronizedMap cache map.
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Define
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Break
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Evaluate
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Include
DEBUG [main] velocity.log:168 | Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Created '20' parsers.
DEBUG [main] velocity.log:168 | Velocimacro : adding VMs from VM library :
/WEB-INF/VM_global_library.vm
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocity was not initialized! Calling
init()...
DEBUG [main] velocity.log:168 | Velocimacro : allowInline = true : VMs can
be defined inline in templates
DEBUG [main] velocity.log:168 | Velocimacro : allowInlineToOverride = false
: VMs defined inline may NOT replace previous VM definitions
DEBUG [main] velocity.log:168 | Velocimacro : allowInlineLocal = false : VMs
defined inline will be global in scope if allowed.
DEBUG [main] velocity.log:168 | Velocimacro : autoload off : VM system will
not automatically reload global library macros
DEBUG [main] velocity.log:168 | Did not find resource at:
/WEB-INF/toolbox.xml -- I don't think I told velocity to look for
toolbox.xml. Is that a normal log?
DEBUG [main] velocity.log:168 | Loaded configuration from:
/WEB-INF/tools.xml
DEBUG [main] velocity.log:168 | Loaded configuration from:
/WEB-INF/tools.xml
DEBUG [main] velocity.log:168 | Configuring factory with: 
FactoryConfiguration from 8 sources including 4 data with 3 toolboxes: 
 Toolbox 'application' with 1 properties [scope -auto-> application; ] and
12 tools: 
  Tool 'alternator' => org.apache.velocity.tools.generic.AlternatorTool 
  Tool 'class' => org.apache.velocity.tools.generic.ClassTool 
  Tool 'convert' => org.apache.velocity.tools.generic.ConversionTool 
  Tool 'date' => org.apache.velocity.tools.generic.DateTool with 1
properties [format -auto-> dd/MM/yyyy; ]
  Tool 'display' => org.apache.velocity.tools.generic.DisplayTool 
  Tool 'esc' => org.apache.velocity.tools.generic.EscapeTool 
  Tool 'field' => org.apache.velocity.tools.generic.FieldTool 
  Tool 'math' => org.apache.velocity.tools.generic.MathTool 
  Tool 'number' => org.apache.velocity.tools.generic.NumberTool 
  Tool 'sorter' => org.apache.velocity.tools.generic.SortTool 
  Tool 'text' => org.apache.velocity.tools.generic.ResourceTool 
  Tool 'xml' => org.apache.velocity.tools.generic.XmlTool 
  
 Toolbox 'request' with 1 properties [scope -auto-> request; ] and 15 tools: 
  Tool 'context' => org.apache.velocity.tools.view.ViewContextTool 
  Tool 'cookies' => org.apache.velocity.tools.view.CookieTool 
  Tool 'errors' => org.apache.velocity.tools.struts.ErrorsTool 
  Tool 'form' => org.apache.velocity.tools.struts.FormTool 
  Tool 'import' => org.apache.velocity.tools.view.ImportTool 
  Tool 'include' => org.apache.velocity.tools.view.IncludeTool 
  Tool 'link' => org.apache.velocity.tools.struts.StrutsLinkTool 
  Tool 'loop' => org.apache.velocity.tools.generic.LoopTool 
  Tool 'messages' => org.apache.velocity.tools.struts.ActionMessagesTool 
  Tool 'pager' => org.apache.velocity.tools.view.PagerTool 
  Tool 'params' => org.apache.velocity.tools.view.ParameterTool 
  Tool 'render' => org.apache.velocity.tools.generic.RenderTool 
  Tool 'text' => org.apache.velocity.tools.struts.MessageTool 
  Tool 'tiles' => org.apache.velocity.tools.struts.TilesTool 
  Tool 'validator' => org.apache.velocity.tools.struts.ValidatorTool 
  
 Toolbox 'session' with 2 properties [createSession -auto-> false; scope
-auto-> session; ] and 1 tools: 
  Tool 'browser' => org.apache.velocity.tools.view.BrowserTool 
  
 Data 'GENERIC_TOOLS_AVAILABLE' -boolean-> true
 Data 'STRUTS_TOOLS_AVAILABLE' -boolean-> true
 Data 'TOOLS_VERSION' -number-> 2.0
 Data 'VIEW_TOOLS_AVAILABLE' -boolean-> true
 
 Source 0:
org.apache.velocity.tools.config.FactoryConfiguration(VelocityView.configure(config,factory))
 Source 1:
org.apache.velocity.tools.config.XmlFactoryConfiguration(ConfigurationUtils.getDefaultTools())
 Source 2:    
.read(jar:file:/Users/nodje/Documents/project/work/project/target/project/WEB-INF/lib/velocity-tools-2.0.jar!/org/apache/velocity/tools/generic/tools.xml)
 Source 3:    
.read(jar:file:/Users/nodje/Documents/project/work/project/target/project/WEB-INF/lib/velocity-tools-2.0.jar!/org/apache/velocity/tools/view/tools.xml)
 Source 4:    
.read(jar:file:/Users/nodje/Documents/project/work/project/target/project/WEB-INF/lib/velocity-tools-2.0.jar!/org/apache/velocity/tools/struts/tools.xml)
 Source 5:
org.apache.velocity.tools.config.FactoryConfiguration(ConfigurationUtils.getAutoLoaded(false))
 Source 6:
org.apache.velocity.tools.config.XmlFactoryConfiguration(ServletUtils.getConfiguration(/WEB-INF/tools.xml,ServletContext[,depMode=true]))
 Source 7:
org.apache.velocity.tools.config.XmlFactoryConfiguration(ServletUtils.getConfiguration(/WEB-INF/tools.xml,ServletContext[,depMode=true]))

The exemple provided in the upgrade to 2.0 page for tools.xml actually
doesn't work, it should be:


    
        
    


If "date" is used instead of the fully qualified calss name, an error is
reported.

cheers,
nodje
-- 
View this message in context: 
http://old.nabble.com/Upgrading-to-Tools-2.0---1.6.4%2C-sorting-out-log-messages-tp28804764p28804764.html
Sent from the Velocity - Dev mailing list archive at Nabble.com.

Reply via email to