|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (VELOCITY-720) Suppress startup error message if macro library not foundSuppress startup error message if macro library not found
--------------------------------------------------------- Key: VELOCITY-720 URL: https://issues.apache.org/jira/browse/VELOCITY-720 Project: Velocity Issue Type: Improvement Components: Engine Reporter: Will Glass-Husain Priority: Minor Ever since upgrading to Velocity 1.6.2 I get a stack trace when starting up due to a missing macro library. The stack trace in particular makes for a very noisy log. I suggest we do not print a stacktrace for a missing macro library at startup. Here's my settings VelocityEngine ve = new VelocityEngine(); ve.setProperty("resource.loader", "class"); ve.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); ve.setProperty("class.resource.loader.cache", "false"); ve.setProperty("runtime.Log.invalid.references ", "false"); ve.setProperty("resource.manager.logwhenfound", "false"); ve.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem"); ve.setProperty("runtime.log.logsystem.log4j.category", "com.forio.Velocity"); And here's the log report 2009-05-26 23:46:58 DEBUG Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm 2009-05-26 23:46:58 DEBUG Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader: 2009-05-26 23:46:58 DEBUG org.apache.velocity.exception.ResourceNotFoundException: ClasspathResourceLoader Error: cannot find resource VM_global_library.vm at org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader.getResourceStream(ClasspathResourceLoader.java:131) at org.apache.velocity.runtime.resource.loader.ResourceLoader.resourceExists(ResourceLoader.java:224) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderForResource(ResourceManagerImpl.java:641) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderNameForResource(ResourceManagerImpl.java:624) at org.apache.velocity.runtime.RuntimeInstance.getLoaderNameForResource(RuntimeInstance.java:1464) at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:159) at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261) at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
[jira] Commented: (VELOCITY-720) Suppress startup error message if macro library not found[ https://issues.apache.org/jira/browse/VELOCITY-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713667#action_12713667 ] Nathan Bubna commented on VELOCITY-720: --------------------------------------- I would clarify that to say we only want to suppress this for the default 'velocimacro.library' setting. If the user has specified an alternate velocimacro.library value, then we need to be sure to let them know it's missing. > Suppress startup error message if macro library not found > --------------------------------------------------------- > > Key: VELOCITY-720 > URL: https://issues.apache.org/jira/browse/VELOCITY-720 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Will Glass-Husain > Priority: Minor > > Ever since upgrading to Velocity 1.6.2 I get a stack trace when starting up due to a missing macro library. The stack trace in particular makes for a very noisy log. I suggest we do not print a stacktrace for a missing macro library at startup. > Here's my settings > VelocityEngine ve = new VelocityEngine(); > ve.setProperty("resource.loader", "class"); > ve.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); > ve.setProperty("class.resource.loader.cache", "false"); > ve.setProperty("runtime.Log.invalid.references ", "false"); > ve.setProperty("resource.manager.logwhenfound", "false"); > ve.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem"); > ve.setProperty("runtime.log.logsystem.log4j.category", "com.forio.Velocity"); > And here's the log report > 2009-05-26 23:46:58 DEBUG Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm > 2009-05-26 23:46:58 DEBUG Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader: > 2009-05-26 23:46:58 DEBUG > org.apache.velocity.exception.ResourceNotFoundException: > ClasspathResourceLoader Error: cannot find resource VM_global_library.vm > at org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader.getResourceStream(ClasspathResourceLoader.java:131) > at org.apache.velocity.runtime.resource.loader.ResourceLoader.resourceExists(ResourceLoader.java:224) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderForResource(ResourceManagerImpl.java:641) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderNameForResource(ResourceManagerImpl.java:624) > at org.apache.velocity.runtime.RuntimeInstance.getLoaderNameForResource(RuntimeInstance.java:1464) > at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:159) > at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261) > at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
[jira] Updated: (VELOCITY-720) Suppress startup error message if macro library not found[ https://issues.apache.org/jira/browse/VELOCITY-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain updated VELOCITY-720: --------------------------------------- Fix Version/s: 1.7 > Suppress startup error message if macro library not found > --------------------------------------------------------- > > Key: VELOCITY-720 > URL: https://issues.apache.org/jira/browse/VELOCITY-720 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Will Glass-Husain > Priority: Minor > Fix For: 1.7 > > > Ever since upgrading to Velocity 1.6.2 I get a stack trace when starting up due to a missing macro library. The stack trace in particular makes for a very noisy log. I suggest we do not print a stacktrace for a missing macro library at startup. > Here's my settings > VelocityEngine ve = new VelocityEngine(); > ve.setProperty("resource.loader", "class"); > ve.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); > ve.setProperty("class.resource.loader.cache", "false"); > ve.setProperty("runtime.Log.invalid.references ", "false"); > ve.setProperty("resource.manager.logwhenfound", "false"); > ve.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem"); > ve.setProperty("runtime.log.logsystem.log4j.category", "com.forio.Velocity"); > And here's the log report > 2009-05-26 23:46:58 DEBUG Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm > 2009-05-26 23:46:58 DEBUG Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader: > 2009-05-26 23:46:58 DEBUG > org.apache.velocity.exception.ResourceNotFoundException: > ClasspathResourceLoader Error: cannot find resource VM_global_library.vm > at org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader.getResourceStream(ClasspathResourceLoader.java:131) > at org.apache.velocity.runtime.resource.loader.ResourceLoader.resourceExists(ResourceLoader.java:224) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderForResource(ResourceManagerImpl.java:641) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderNameForResource(ResourceManagerImpl.java:624) > at org.apache.velocity.runtime.RuntimeInstance.getLoaderNameForResource(RuntimeInstance.java:1464) > at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:159) > at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261) > at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
|
|
[jira] Resolved: (VELOCITY-720) Suppress startup error message if macro library not found[ https://issues.apache.org/jira/browse/VELOCITY-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain resolved VELOCITY-720. ---------------------------------------- Resolution: Fixed I changed the Resource Loader code to omit the stack trace for a resource not found. It seems overkill. (and rather frightening). It still logs the message, in this case: cannot find resource VM_global_library.vm. > Suppress startup error message if macro library not found > --------------------------------------------------------- > > Key: VELOCITY-720 > URL: https://issues.apache.org/jira/browse/VELOCITY-720 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Will Glass-Husain > Priority: Minor > Fix For: 1.7 > > > Ever since upgrading to Velocity 1.6.2 I get a stack trace when starting up due to a missing macro library. The stack trace in particular makes for a very noisy log. I suggest we do not print a stacktrace for a missing macro library at startup. > Here's my settings > VelocityEngine ve = new VelocityEngine(); > ve.setProperty("resource.loader", "class"); > ve.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); > ve.setProperty("class.resource.loader.cache", "false"); > ve.setProperty("runtime.Log.invalid.references ", "false"); > ve.setProperty("resource.manager.logwhenfound", "false"); > ve.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem"); > ve.setProperty("runtime.log.logsystem.log4j.category", "com.forio.Velocity"); > And here's the log report > 2009-05-26 23:46:58 DEBUG Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm > 2009-05-26 23:46:58 DEBUG Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader: > 2009-05-26 23:46:58 DEBUG > org.apache.velocity.exception.ResourceNotFoundException: > ClasspathResourceLoader Error: cannot find resource VM_global_library.vm > at org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader.getResourceStream(ClasspathResourceLoader.java:131) > at org.apache.velocity.runtime.resource.loader.ResourceLoader.resourceExists(ResourceLoader.java:224) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderForResource(ResourceManagerImpl.java:641) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderNameForResource(ResourceManagerImpl.java:624) > at org.apache.velocity.runtime.RuntimeInstance.getLoaderNameForResource(RuntimeInstance.java:1464) > at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:159) > at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261) > at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@... For additional commands, e-mail: dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |