log4j用RollingFileAppender
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
log4j-rotate
.gitignore
README

README

log4j用RollingFileAppender 

- Appender

DailyDirRollingFileAppender
  日毎のディレクトリでログのローテーションを行います

- maven の記述

    <repository>
      <id>troter.jp/release</id>
      <name>TROTER.JP Release Maven2 Repository</name>
      <url>http://troter.jp/maven2/release</url>
    </repository>

    <dependency>
      <groupId>jp.troter</groupId>
      <artifactId>log4j-rotate</artifactId>
      <version>1.0.0</version>
    </dependency>

- log4j.properties (DailyDirRollingFileAppenderを利用する場合)

log4j.logger.rotateperdaydirectory=INFO, rotateperdaydirectory

log4j.appender.rotateperdaydirectory=jp.troter.log4j.DailyDirRollingFileAppender
log4j.appender.rotateperdaydirectory.File=/var/log/rotateperdaydirectory.log
log4j.appender.rotateperdaydirectory.DatePattern=yyyy/MM/dd/.HH
log4j.appender.rotateperdaydirectory.Append=true
log4j.appender.rotateperdaydirectory.layout=org.apache.log4j.PatternLayout
log4j.appender.rotateperdaydirectory.layout.ConversionPattern=%d %m%n