Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8FA9E200BD3 for ; Mon, 21 Nov 2016 16:03:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8E57A160AF9; Mon, 21 Nov 2016 15:03:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D2E85160B1C for ; Mon, 21 Nov 2016 16:03:00 +0100 (CET) Received: (qmail 94885 invoked by uid 500); 21 Nov 2016 15:02:59 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 94782 invoked by uid 99); 21 Nov 2016 15:02:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2016 15:02:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 854FD2C4C78 for ; Mon, 21 Nov 2016 15:02:59 +0000 (UTC) Date: Mon, 21 Nov 2016 15:02:59 +0000 (UTC) From: "Pastrie (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (LOG4J2-1721) Composite configuration using log4jConfiguration context parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 21 Nov 2016 15:03:01 -0000 Pastrie created LOG4J2-1721: ------------------------------- Summary: Composite configuration using log4jConfiguration context parameter Key: LOG4J2-1721 URL: https://issues.apache.org/jira/browse/LOG4J2-1721 Project: Log4j 2 Issue Type: Improvement Components: Configurators, Web/Servlet Affects Versions: 2.7 Reporter: Pastrie Log4j allows multiple configuration files to be used by specifying them as a list of comma separated file paths on log4j.configurationFile property. This feature is not available in web environment since the log4jConfiguration context parameter accepts a Path/File/URI. My proposal is to apply some small changes in the Log4jWebInitializerImpl class - change method getConfigURI to return List instead of URI. if (configLocation != null) { if (configLocation.contains(",")) { final String[] parts = configLocation.split(","); final List uris = new ArrayList<>(parts.length); for (final String part : parts) { final URL url = servletContext.getResource(part); if (url != null) { final URI uri = url.toURI(); LOGGER.debug("getConfigURI found resource [{}] in servletContext at [{}]", uri, configLocation); uris.add(url); } } } - change method initializeNonJndi [...] final List listUri = getConfigURI(location); this.loggerContext = Configurator.initialize(this.name, this.getClassLoader(), listUri, this.servletContext); } -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org