org.apache.log.output.io
public class FileTarget extends StreamTarget
Field Summary | |
---|---|
boolean | m_append |
File | m_file |
Constructor Summary | |
---|---|
FileTarget(File file, boolean append, Formatter formatter)
Construct file target to write to a file with a formatter.
|
Method Summary | |
---|---|
protected File | getFile()
Retrieve file associated with target.
|
protected void | openFile()
Open underlying file and allocate resources.
|
protected void | setFile(File file, boolean append)
Set the file for this target.
|
Parameters: file the file to write to append true if file is to be appended to, false otherwise formatter the Formatter
Throws: IOException if an error occurs
Returns: the output File
Throws: IOException if directories can not be created or file can not be opened
Parameters: file the file to write to append true if file is to be appended to, false otherwise
Throws: IOException if directories can not be created or file can not be opened