1
Log4j 2에있는 The RollingFile Appender에 대한 Filepattern에 대한 질문이 있습니다. RollingFile에는 FileName과 FilePattern이 필요하지만 FilePattern이 무엇인지는 알지 못합니다. 그냥 무시한다고 생각합니다. documentation에 관한 내 log4j2.xmlLog4j 2의 Filepattern은 무엇입니까?
<Property name="pattern">%-5p [%d{dd.MM.yyyy - HH:mm:ss}] : %m%n %ex</Property>
<Property name="MainLoggerPath">C:/logs/MainLogger.log</Property>
<Property name="FilePattern">C:/logs/$${date:yyyy-MM}/app-%d{MM- dd-yyyy}-%i.log.gz</Property>
<RollingFile name="MainAppender" fileName="${MainLoggerPath}"
filePattern="${FilePattern}">
<ThresholdFilter level="ALL" onMatch="ACCEPT" onMismatch="DENY" />
<PatternLayout
pattern="${pattern}" />
<Policies>
<SizeBasedTriggeringPolicy size="10 MB" />
</Policies>
<DefaultRolloverStrategy max="10" />
</RollingFile>