public class RotatingFileTarget extends FileTarget
| Modifier and Type | Field and Description |
|---|---|
private boolean |
m_append |
private FileStrategy |
m_fileStrategy |
private RotateStrategy |
m_rotateStrategy |
| 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(String data)
Output the log message, and check if rotation is needed.
|
getFile, openFile, setFileclose, setOutputStream, shutdownStreamdoProcessEvent, getFormatter, opengetErrorHandler, isOpen, processEvent, setErrorHandlerprivate boolean m_append
private RotateStrategy m_rotateStrategy
private FileStrategy m_fileStrategy
public RotatingFileTarget(Formatter formatter, RotateStrategy rotateStrategy, FileStrategy fileStrategy) throws IOException
formatter - Formatter to be usedrotateStrategy - RotateStrategy to be usedfileStrategy - FileStrategy to be usedIOException - if a file access or write related error occurspublic RotatingFileTarget(boolean append,
Formatter formatter,
RotateStrategy rotateStrategy,
FileStrategy fileStrategy)
throws IOException
append - true if file is to be appended to, false otherwiseformatter - Formatter to be usedrotateStrategy - RotateStrategy to be usedfileStrategy - FileStrategy to be usedIOException - if a file access or write related error occursprotected void rotate()
throws IOException
IOException - if a file access or write related error occursprotected void write(String data)
write in class StreamTargetdata - the date to write to the targetCopyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.