Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A826BF6DE for ; Wed, 27 Mar 2013 17:59:15 +0000 (UTC) Received: (qmail 6285 invoked by uid 500); 27 Mar 2013 17:59:15 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 6220 invoked by uid 500); 27 Mar 2013 17:59:15 -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 6212 invoked by uid 99); 27 Mar 2013 17:59:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Mar 2013 17:59:15 +0000 Date: Wed, 27 Mar 2013 17:59:15 +0000 (UTC) From: "Ralph Goers (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-185) Howto individually configure logging for separate instances of a webapp (war file)? 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/LOG4J2-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615557#comment-13615557 ] Ralph Goers commented on LOG4J2-185: ------------------------------------ Please see - http://logging.apache.org/log4j/2.x/log4j-web/index.html and the sample at https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/samples/flume-remote/src/main/webapp/WEB-INF/web.xml. > Howto individually configure logging for separate instances of a webapp (war file)? > ----------------------------------------------------------------------------------- > > Key: LOG4J2-185 > URL: https://issues.apache.org/jira/browse/LOG4J2-185 > Project: Log4j 2 > Issue Type: Question > Components: Configurators, Documentation > Affects Versions: 2.0-beta5 > Environment: multiple copies of one webapp (war file) deployed in one servlet container (e.g. Tomcat) > Reporter: Alexander Horz > Labels: configuration, documentation, > > The logging of separate instances of one webapp (war file) deployed in a joint servlet container shall be directed to separate files/directories. E.g. a "production", "demo", and "test" copy of webapp "foo.war" are deployed in a joint Tomcat, and logging of the shall be directed to ".../log/production/*", ".../log/demo/*" and ".../log/test/*" respectively. > The only solution I have found requires replacement of ".../WEB-INF/classes/log4j2.xml" for each but the first webapp. However, this requires un/repackaging of the war file. > I would like to: > - use an unmodified war file for all instances, > - set the "logging directory" parameter in each instance' "context" configuration file, and > - programmatically reconfigure the individual configuration loaded from ".../WEB-INF/classes/log4j2.xml" when each instance is starting. > Is this possible? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org For additional commands, e-mail: log4j-dev-help@logging.apache.org