ErrorAware
, LogTarget
, Closeable
public class SafeFileTarget extends FileTarget
Constructor | Description |
---|---|
SafeFileTarget(java.io.File file,
boolean append,
Formatter formatter) |
Construct file target to write to a file with a formatter.
|
Modifier and Type | Method | Description |
---|---|---|
void |
processEvent(LogEvent event) |
Process a log event, via formatting and outputting it.
|
doProcessEvent, getFormatter, open
getErrorHandler, isOpen, setErrorHandler
getFile, openFile, setFile
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, setOutputStream, shutdownStream, write
public SafeFileTarget(java.io.File file, boolean append, Formatter formatter) throws java.io.IOException
file
- the file to write toappend
- true if file is to be appended to, false otherwiseformatter
- the Formatterjava.io.IOException
- if an error occurspublic void processEvent(LogEvent event)
processEvent
in interface LogTarget
processEvent
in class AbstractTarget
event
- the log eventCopyright © 2003-2004 The Apache Software Foundation. All Rights Reserved.