You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Artur Burnos (JIRA)" <ji...@apache.org> on 2014/10/23 16:49:33 UTC

[jira] [Commented] (LOG4J2-872) Property substitution works incorrectly for filePattern in RollingFile appender

    [ https://issues.apache.org/jira/browse/LOG4J2-872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14181413#comment-14181413 ] 

Artur Burnos commented on LOG4J2-872:
-------------------------------------

I asked question on stackoverflow:
- http://stackoverflow.com/questions/26284804/log4j2-property-substitution-works-incorrectly-for-filepattern-in-rollingfile-a

Answered: Remko Popma

What you describe looks very much like the issue reported in LOG4J2-829. This is a bug that was introduced in the 2.0-RC2 release. It was recently fixed in master and the fix will be included in the upcoming 2.1 release. (I hope 2.1 will be released some time next week - but no promises...)

If you are in a hurry, you can check out the code from the Log4j2 GIT repository and build the 2.1-SNAPSHOT locally.


> Property substitution works incorrectly for filePattern in RollingFile appender
> -------------------------------------------------------------------------------
>
>                 Key: LOG4J2-872
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-872
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0.2
>         Environment: Win 7 64, Tomcat 7.0.23, Log4j2 2.0.2
>            Reporter: Artur Burnos
>            Priority: Minor
>         Attachments: log4j2.xml
>
>
> I am trying to configure RollingFile appender in tomcat 7.0.23 with log4j2(2.0.2) with 10 log files.
> I am using in the filePattern the $\{sys:catalina.base}, it doesn't work and log files are placed in tomcat/bin/$\{sys:catalina.base}/ directory.
> The interesting part is that the first log file (without a number) is created ok, under tomcat/logs - which means it succeeds to map the filename attribute to a real path.
> When I replace $\{sys:catalina.base} with filePattern="C:/apache-tomcat-7.0.23/logs/app.%i.log" it works.
> Meaning that the filePattern is not interpreted properly.



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