| org.jivesoftware.util.log.output.io.StreamTarget org.jivesoftware.util.log.output.io.FileTarget
All known Subclasses: org.jivesoftware.util.log.output.io.rotate.RotatingFileTarget,
Constructor Summary | |
public | FileTarget(File file, boolean append, Formatter formatter) Construct file target to send to a file with a formatter. |
Method Summary | |
protected synchronized File | getFile() Retrieve file associated with target. | protected synchronized void | openFile() Open underlying file and allocate resources. | protected synchronized void | setFile(File file, boolean append) Set the file for this target. |
FileTarget | public FileTarget(File file, boolean append, Formatter formatter) throws IOException(Code) | | Construct file target to send to a file with a formatter.
Parameters: file - the file to send to Parameters: append - true if file is to be appended to, false otherwise Parameters: formatter - the Formatter throws: IOException - if an error occurs |
getFile | protected synchronized File getFile()(Code) | | Retrieve file associated with target.
This allows subclasses to access file object.
the output File |
openFile | protected synchronized void openFile() throws IOException(Code) | | Open underlying file and allocate resources.
This method will attempt to create directories below file and
append to it if specified.
|
setFile | protected synchronized void setFile(File file, boolean append) throws IOException(Code) | | Set the file for this target.
Parameters: file - the file to send to Parameters: 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 |
|
|