Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87EF2B740 for ; Thu, 12 Jan 2012 15:12:05 +0000 (UTC) Received: (qmail 1784 invoked by uid 500); 12 Jan 2012 15:12:05 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 1746 invoked by uid 500); 12 Jan 2012 15:12:02 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 1730 invoked by uid 99); 12 Jan 2012 15:12:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 15:12:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 15:11:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 743D0147129 for ; Thu, 12 Jan 2012 15:11:39 +0000 (UTC) Date: Thu, 12 Jan 2012 15:11:39 +0000 (UTC) From: "Bobby Hargett (Updated) (JIRA)" To: issues@camel.apache.org Message-ID: <711495174.34701.1326381099477.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1046912534.30939.1326307658991.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAMEL-4884) Make velocity logging configurable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-4884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bobby Hargett updated CAMEL-4884: --------------------------------- Fix Version/s: 2.9.0 > 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