[ http://issues.apache.org/jira/browse/VELOCITY-85?page=comments#action_12369108 ]
Nathan Bubna commented on VELOCITY-85: -------------------------------------- Ok, i've more or less finished with this. as a guide, here's what i came up with as criteria for determining appropriate log level: trace - if the only info is that something is starting or finishing debug - "using default..." messages - version info - "trying to..." messages - internal behavior config messages (e.g. parser pool size setting) - various other messages only useful in development/debugging info - non-default external behavior config messages (e.g. not allowing macros to be defined inline) - potential problems with template data (e.g. null references) - fully manageable, but unexpected runtime conditions (e.g. parser pool exhaustion) - deprecation notices warn - things which don't break Velocity, but may break something down the line - potentially recoverable configuration/initialization problems (e.g. "doesn't implement Foo") error - pretty much whenever Velocity fails to do what was asked of it for whatever reason of course, i'm not claiming i followed these exactly or that this is exhaustive. i'm just trying to give some idea of how i changed things. > Logging too verbose when used with Log4J > ---------------------------------------- > > Key: VELOCITY-85 > URL: http://issues.apache.org/jira/browse/VELOCITY-85 > Project: Velocity > Type: Bug > Components: Build > Versions: 1.3-rc1 > Environment: Operating System: other > Platform: All > Reporter: Andy Riedel > Assignee: Velocity-Dev List > Priority: Minor > Fix For: 1.5 > > When using using Log4J to handle Velocity logging, many of the internal > logging > messages generated by the VelocityEngine are too verbose. Below is some > sample > output when logging to Log4J. It seems that much of this information should > be > at DEBUG prioriry and not INFO priority. In fact, it's arguable that all of > these messages (except for the ERROR one) should be at DEBUG priority. > Andy Riedel > [EMAIL PROTECTED] > 2002-06-17 18:26:02,312 [main] INFO VelocityEngine - > ************************************************************** > 2002-06-17 18:26:02,322 [main] INFO VelocityEngine - Starting Jakarta > Velocity > v1.3-rc1 > 2002-06-17 18:26:02,332 [main] INFO VelocityEngine - RuntimeInstance > initializing. > 2002-06-17 18:26:02,342 [main] INFO VelocityEngine - Default Properties > File: > org\apache\velocity\runtime\defaults\velocity.properties > 2002-06-17 18:26:02,352 [main] INFO VelocityEngine - Trying to use logger > class org.apache.velocity.runtime.log.SimpleLog4JLogSystem > 2002-06-17 18:26:02,362 [main] INFO VelocityEngine - Using logger class > org.apache.velocity.runtime.log.SimpleLog4JLogSystem > 2002-06-17 18:26:02,382 [main] INFO VelocityEngine - Default ResourceManager > initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl) > 2002-06-17 18:26:02,402 [main] INFO VelocityEngine - Resource Loader > Instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader > 2002-06-17 18:26:02,412 [main] INFO VelocityEngine - FileResourceLoader : > initialization starting. > 2002-06-17 18:26:02,422 [main] INFO VelocityEngine - FileResourceLoader : > adding path '../../skins/default' > 2002-06-17 18:26:02,432 [main] INFO VelocityEngine - FileResourceLoader : > initialization complete. > 2002-06-17 18:26:02,452 [main] INFO VelocityEngine - ResourceCache : > initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl) > 2002-06-17 18:26:02,462 [main] INFO VelocityEngine - Default ResourceManager > initialization complete. > 2002-06-17 18:26:02,472 [main] INFO VelocityEngine - Loaded System > Directive: > org.apache.velocity.runtime.directive.Literal > 2002-06-17 18:26:02,492 [main] INFO VelocityEngine - Loaded System > Directive: > org.apache.velocity.runtime.directive.Macro > 2002-06-17 18:26:02,502 [main] INFO VelocityEngine - Loaded System > Directive: > org.apache.velocity.runtime.directive.Parse > 2002-06-17 18:26:02,522 [main] INFO VelocityEngine - Loaded System > Directive: > org.apache.velocity.runtime.directive.Include > 2002-06-17 18:26:02,532 [main] INFO VelocityEngine - Loaded System > Directive: > org.apache.velocity.runtime.directive.Foreach > 2002-06-17 18:26:02,712 [main] INFO VelocityEngine - Created: 20 parsers. > 2002-06-17 18:26:02,722 [main] INFO VelocityEngine - Velocimacro : > initialization starting. > 2002-06-17 18:26:02,732 [main] INFO VelocityEngine - Velocimacro : adding > VMs > from VM library template : VM_global_library.vm > 2002-06-17 18:26:02,753 [main] ERROR VelocityEngine - ResourceManager : > unable > to find resource 'VM_global_library.vm' in any resource loader. > 2002-06-17 18:26:02,763 [main] INFO VelocityEngine - Velocimacro : error > using VM library template VM_global_library.vm : > org.apache.velocity.exception.ResourceNotFou > ndException: Unable to find resource 'VM_global_library.vm' > 2002-06-17 18:26:02,783 [main] INFO VelocityEngine - Velocimacro : VM > library > template macro registration complete. > 2002-06-17 18:26:02,793 [main] INFO VelocityEngine - Velocimacro : > allowInline > = true : VMs can be defined inline in templates > 2002-06-17 18:26:02,823 [main] INFO VelocityEngine - Velocimacro : > allowInlineToOverride = false : VMs defined inline may NOT replace previous > VM > definitions > 2002-06-17 18:26:02,823 [main] INFO VelocityEngine - Velocimacro : > allowInlineLocal = false : VMs defined inline will be global in scope if > allowed. > 2002-06-17 18:26:02,833 [main] INFO VelocityEngine - Velocimacro : messages > on : VM system will output logging messages > 2002-06-17 18:26:02,853 [main] INFO VelocityEngine - Velocimacro : autoload > off : VM system will not automatically reload global library macros > 2002-06-17 18:26:02,863 [main] INFO VelocityEngine - Velocimacro : > initialization complete. > 2002-06-17 18:26:02,873 [main] INFO VelocityEngine - Velocity successfully > started. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]