camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David J. M. Karlsen (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4884) Make velocity logging configurable
Date Thu, 12 Jan 2012 17:17:40 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-4884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185079#comment-13185079
] 

David J. M. Karlsen commented on CAMEL-4884:
--------------------------------------------

Fix version should probably be 2.9.1 and not 2.9.0 as it's been released already.
                
> Make velocity logging configurable
> ----------------------------------
>
>                 Key: CAMEL-4884
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4884
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-velocity
>            Reporter: Bobby Hargett
>              Labels: logging, velocity
>             Fix For: 2.8.1, 2.9.0
>
>
> Our team would like to have the velocity logging redirect to our logger, but this is
not possible because it is hard coded into camel to use commons.  I think the code should
check to see if the logger has been set and if it has it should change it.
> Offending Code:
> VelocityEndpoint.getVelocityEngine
>             if (ObjectHelper.isNotEmpty(getPropertiesFile())) {
>                 Resource resource = getResourceLoader().getResource(getPropertiesFile());
>                 InputStream reader = resource.getInputStream();
>                 properties.load(reader);
>                 log.info("Loaded the velocity configuration file " + getPropertiesFile());
>             }
>             // set the class resolver as a property so we can access it from CamelVelocityClasspathResourceLoader
>             velocityEngine.addProperty("CamelClassResolver", getCamelContext().getClassResolver());
>             // set regular properties
>             properties.setProperty(Velocity.FILE_RESOURCE_LOADER_CACHE, isLoaderCache()
? "true" : "false");
>             properties.setProperty(Velocity.RESOURCE_LOADER, "file, class");
>             properties.setProperty("class.resource.loader.description", "Camel Velocity
Classpath Resource Loader");
>             properties.setProperty("class.resource.loader.class", CamelVelocityClasspathResourceLoader.class.getName());
>             {color:red} *add a if test here?*{color}
>             properties.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM_CLASS, CommonsLogLogChute.class.getName());
>             properties.setProperty(CommonsLogLogChute.LOGCHUTE_COMMONS_LOG_NAME, VelocityEndpoint.class.getName());

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message