开发者

log4j FileAppender using FileDatePatternConverter

Trying to use a pattern for filename in config such as:

<appender name="FileAppender" class="org.apache.log4j.FileAppender">
  <param name="File" class="org.apache.log4j.pattern.FileDatePatternConverter" value="logs/App-%d{yyyy-MM-dd_HH-mm-ss}.log" />
  <layout开发者_Python百科 class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%-5p(%c{1}) %d{yyyy-MM-dd HH:mm:ss.SSS}: %m%n" />
  </layout>
</appender>

This does not what work. What is correct syntax?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜