org.apache.log.output.io.rotate
public class RotatingFileTarget extends FileTarget
m_formatter
Constructor and Description |
---|
RotatingFileTarget(boolean append,
Formatter formatter,
RotateStrategy rotateStrategy,
FileStrategy fileStrategy)
Construct RotatingFileTarget object.
|
RotatingFileTarget(Formatter formatter,
RotateStrategy rotateStrategy,
FileStrategy fileStrategy)
Construct RotatingFileTarget object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
rotate()
Rotates the file.
|
protected void |
write(java.lang.String data)
Output the log message, and check if rotation is needed.
|
getFile, openFile, setFile
close, setOutputStream, shutdownStream
doProcessEvent, getFormatter, open, output, setFormatter
error, getErrorHandler, isOpen, processEvent, setErrorHandler
public RotatingFileTarget(Formatter formatter, RotateStrategy rotateStrategy, FileStrategy fileStrategy) throws java.io.IOException
formatter
- Formatter to be usedrotateStrategy
- RotateStrategy to be usedfileStrategy
- FileStrategy to be usedjava.io.IOException
- if a file access or write related error occurspublic RotatingFileTarget(boolean append, Formatter formatter, RotateStrategy rotateStrategy, FileStrategy fileStrategy) throws java.io.IOException
append
- true if file is to be appended to, false otherwiseformatter
- Formatter to be usedrotateStrategy
- RotateStrategy to be usedfileStrategy
- FileStrategy to be usedjava.io.IOException
- if a file access or write related error occursprotected void rotate() throws java.io.IOException
java.io.IOException
- if a file access or write related error occursprotected void write(java.lang.String data)
write
in class StreamTarget
data
- the date to write to the target