org.apache.log.output.io.rotate
Class RotatingFileTarget
- ErrorAware, LogTarget
public class RotatingFileTarget
This is a basic Output log target that writes to rotating files.
protected void | rotate() - Rotates the file.
|
protected void | write(String data) - Output the log message, and check if rotation is needed.
|
RotatingFileTarget
public RotatingFileTarget(boolean append,
Formatter formatter,
RotateStrategy rotateStrategy,
FileStrategy fileStrategy)
throws IOException
Construct RotatingFileTarget object.
append
- true if file is to be appended to, false otherwiseformatter
- Formatter to be usedrotateStrategy
- RotateStrategy to be usedfileStrategy
- FileStrategy to be used
RotatingFileTarget
public RotatingFileTarget(Formatter formatter,
RotateStrategy rotateStrategy,
FileStrategy fileStrategy)
throws IOException
Construct RotatingFileTarget object.
formatter
- Formatter to be usedrotateStrategy
- RotateStrategy to be usedfileStrategy
- FileStrategy to be used
rotate
protected void rotate()
throws IOException
Rotates the file.
write
protected void write(String data)
Output the log message, and check if rotation is needed.
- write in interface StreamTarget
data
- the date to write to the target