[
https://issues.apache.org/jira/browse/LOG4J2-877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176710#comment-14176710
]
Abhishek Manocha commented on LOG4J2-877:
-----------------------------------------
I think I have got a workaround...
{code:xml}
<RollingFile name="File" fileName="${sys:user.home}\test2.log"
filePattern="$${sys:user.home}\test2.%d{yyyy-MM-dd}-%i.log"
immediateFlush="true" append="true">
{code}
If I do two $$ in filePattern the thing works. Let me know this will be a
correct way after the patch of
[LOG4J2-829|https://issues.apache.org/jira/browse/LOG4J2-829]?
I went through that jira and did take the source code and did a latest build of
log4j, even with that patch and with my original xml something is amiss.
> RollingFile ignoring ${sys:user.home} in filePattern which is working correct
> in fileName
> -----------------------------------------------------------------------------------------
>
> Key: LOG4J2-877
> URL: https://issues.apache.org/jira/browse/LOG4J2-877
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.2
> Environment: Windows
> Reporter: Abhishek Manocha
> Labels: Rollover, async, file-pattern
> Fix For: 2.1
>
>
> I have RollingFile Appender defined like
> {code:xml}
> <RollingFile name="File" fileName="${sys:user.home}\test2.log"
> filePattern="${sys:user.home}\test2.%d{yyyy-MM-dd}-%i.log"
> immediateFlush="true" append="true">
> {code}
> The first file goes in my user home directory perfectly, but the archive ones
> go to my classpath folder wrongly
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]