[
https://issues.apache.org/jira/browse/LOG4J2-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jesse Docken updated LOG4J2-398:
--------------------------------
Description:
I'm trying to create a Log4j2 configuration file that will create a log file
using DateLookup so that the current date and time are in the filename (so it
matches the logging used in our other products). This is what the appender
configuration looks like:
{code:borderStyle=solid|language=XML}
<FastRollingFile name="Rolling" fileName="log/$${date:yyyyMMdd} - myApp.log"
filePattern="log/$${date:yyyyMMdd} - myApp-%i.log">
<immediateFlush>true</immediateFlush>
<suppressExceptions>false</suppressExceptions>
<PatternLayout>
<pattern>%d %p %c{1.} [%t] $${env:USER} %m%n</pattern>
</PatternLayout>
<Policies>
<OnStartupTriggeringPolicy />
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
</FastRollingFile>
{code}
However when the log file is generated the filename is "${date". I've tried
different variations and haven't been able to get this lookup to work at all.
was:
I'm trying to create a Log4j2 configuration file that will create a log file
using DateLookup so that the current date and time are in the filename (so it
matches the logging used in our other products). This is what the appender
configuration looks like:
{noformat}
<FastRollingFile name="Rolling" fileName="log/$${date:yyyyMMdd} - myApp.log"
filePattern="log/$${date:yyyyMMdd} - myApp-%i.log">
<immediateFlush>true</immediateFlush>
<suppressExceptions>false</suppressExceptions>
<PatternLayout>
<pattern>%d %p %c{1.} [%t] $${env:USER} %m%n</pattern>
</PatternLayout>
<Policies>
<OnStartupTriggeringPolicy />
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
</FastRollingFile>
{noformat}
However when the log file is generated the filename is "${date". I've tried
different variations and haven't been able to get this lookup to work at all.
> DateLookup not parsed for FastRollingFile appender
> --------------------------------------------------
>
> Key: LOG4J2-398
> URL: https://issues.apache.org/jira/browse/LOG4J2-398
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.0-beta8
> Environment: Operating System: Windows Server 2008 R2 SP1
> Java Runtime: 1.7.0_03-x64
> Reporter: Jesse Docken
>
> I'm trying to create a Log4j2 configuration file that will create a log file
> using DateLookup so that the current date and time are in the filename (so it
> matches the logging used in our other products). This is what the appender
> configuration looks like:
> {code:borderStyle=solid|language=XML}
> <FastRollingFile name="Rolling" fileName="log/$${date:yyyyMMdd} - myApp.log"
> filePattern="log/$${date:yyyyMMdd} - myApp-%i.log">
> <immediateFlush>true</immediateFlush>
> <suppressExceptions>false</suppressExceptions>
> <PatternLayout>
> <pattern>%d %p %c{1.} [%t] $${env:USER} %m%n</pattern>
> </PatternLayout>
> <Policies>
> <OnStartupTriggeringPolicy />
> <SizeBasedTriggeringPolicy size="100 MB"/>
> </Policies>
> </FastRollingFile>
> {code}
> However when the log file is generated the filename is "${date". I've tried
> different variations and haven't been able to get this lookup to work at all.
--
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: [email protected]
For additional commands, e-mail: [email protected]