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 "Pablo Vidal Otero (JIRA)" <ji...@apache.org> on 2014/09/15 15:34:33 UTC
[jira] [Created] (LOG4J2-829) Error replace slash in pattern file
when rolling file appender
Pablo Vidal Otero created LOG4J2-829:
----------------------------------------
Summary: Error replace slash in pattern file when rolling file appender
Key: LOG4J2-829
URL: https://issues.apache.org/jira/browse/LOG4J2-829
Project: Log4j 2
Issue Type: Bug
Components: Appenders
Affects Versions: 2.0.2
Environment: Development machine Windows 7
Reporter: Pablo Vidal Otero
Priority: Minor
With following log configuration
<RollingFile name="RollingFile" fileName="${sys:user.home}/logs/app.log"
filePattern="${sys:user.home}/logs/app-%d{MM-dd-yyyy}.log">
<PatternLayout>
<pattern>%d %p %c{1.} [%t] %m%n</pattern>
</PatternLayout>
<TimeBasedTriggeringPolicy />
</RollingFile>
When start, the file name is created correctly (C:\user/logs/app.log) but when the file will rotate with file pattern, the path name is wrong. The system property user.home doesn't has slashes. C:user/logs/app-0915-2014.log
--
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