Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

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

About

log4j用RollingFileAppender

Resources

Languages

You can’t perform that action at this time.