Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 47409 invoked from network); 8 Feb 2007 11:05:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2007 11:05:18 -0000 Received: (qmail 42602 invoked by uid 500); 8 Feb 2007 11:05:24 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 42579 invoked by uid 500); 8 Feb 2007 11:05:24 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 42570 invoked by uid 99); 8 Feb 2007 11:05:24 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2007 03:05:24 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [206.190.39.48] (HELO web54215.mail.yahoo.com) (206.190.39.48) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 08 Feb 2007 03:05:13 -0800 Received: (qmail 96693 invoked by uid 60001); 8 Feb 2007 11:04:52 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=A10Gv8clJaYYyaY/s6AShaMVksPuku8pTYNlk+Ms6hDbzge96GFLsEsA3Z+UdJ9IlUfnNqTqQqWvbJXcASQzkRWyfZZp14E2LyZdpxp7JmHPjth8z8RYEuNRvse1iq8PVpISYexe6V0WCOS7S4aAn1VIPCTVRAeoqv9Z4JY/SlE=; X-YMail-OSG: rv80h8AVM1mgGda6pyu0dWYNiALV_BA_W6nSuZJ3HYdD1XNty2pW.unstorw3cNLol1NdihUaZ_nd5ahbBHCoIDfC7bTgcL_zWExQZcYqcUW_hXDei_JBeGKoQMUB03DY4P5XJz0LnHE0gg- Received: from [125.18.63.118] by web54215.mail.yahoo.com via HTTP; Thu, 08 Feb 2007 03:04:52 PST Date: Thu, 8 Feb 2007 03:04:52 -0800 (PST) From: Tushar Vijay Apshankar Subject: Configuring log4j from a URL To: dev@jackrabbit.apache.org In-Reply-To: <510143ac0702080121q2818d082h51cd72f6ea65a436@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2131691914-1170932692=:95695" Content-Transfer-Encoding: 8bit Message-ID: <531739.95695.qm@web54215.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-2131691914-1170932692=:95695 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Developers, We are using JackRabbit in one of our project. We need to specify the logging configuration dynamically through a URL. Currently JackRabbit does not support it. We looked into the LoggingServlet.java and want to modify the configure() method in following way(please see the highlighted code below) so that it starts supporting URL as well: private void configure() throws ServletException { // setup log4j String log4jConfig = getServletConfig().getInitParameter(INIT_PARAM_LOG4J_CONFIG); if (log4jConfig.startsWith("http://")) { configureURL(log4jConfig); return; } InputStream in = getServletContext().getResourceAsStream(log4jConfig); ...... ...... ...... } /** * Configures the log4j from a URL using the {@link DOMConfigurator} * @param urlString * @throws ServletException */ private void configureURL(String urlString) throws ServletException { try { DOMConfigurator.configure(new URL(urlString)); } catch (MalformedURLException e) { throw new ServletException("Invalid URL: " + e.toString()); } } Can you advice how can we get this code checked in into the code-base? Thanks and regards, Tushar --------------------------------- Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. --0-2131691914-1170932692=:95695--