A target that will open and close a file for each logevent.
This is slow but a more reliable form of logging on some
filesystems/OSes. It should only be used when there is a
small number of log events.
author: Peter Donald
Constructor Summary
public
SafeFileTarget(File file, boolean append, Formatter formatter) Construct file target to write to a file with a formatter.
Method Summary
public synchronized void
processEvent(LogEvent event) Process a log event, via formatting and outputting it.
Construct file target to write to a file with a formatter.
Parameters: file - the file to write to Parameters: append - true if file is to be appended to, false otherwise Parameters: formatter - the Formatter exception: IOException - if an error occurs
Method Detail
processEvent
public synchronized void processEvent(LogEvent event)(Code)
Process a log event, via formatting and outputting it.
Parameters: event - the log event
Methods inherited from org.apache.log.output.io.FileTarget