logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-185) Howto individually configure logging for separate instances of a webapp (war file)?
Date Wed, 27 Mar 2013 17:59:15 GMT

    [ 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,
> - 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

View raw message