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(java.lang.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 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 StreamTargetdata - the date to write to the target