org.apache.log.output

Class FileOutputLogTarget

Implemented Interfaces:
ErrorAware, LogTarget

public class FileOutputLogTarget
extends DefaultOutputLogTarget

This is a basic Output log target that writes to a file.
Authors:
Peter Donald
Stephen McConnell

Field Summary

Fields inherited from class org.apache.log.output.io.WriterTarget

m_output

Fields inherited from class org.apache.log.output.AbstractOutputTarget

m_formatter

Constructor Summary

FileOutputLogTarget()
FileOutputLogTarget(String filename)
FileOutputLogTarget(String filename, boolean append)

Method Summary

void
setAppend(boolean append)
void
setFilename(String filename)
Overwrites the m_output value in the super class through assignment of an OutputStreamWriter based on a supplied file path.

Methods inherited from class org.apache.log.output.DefaultOutputLogTarget

initPattern, setFormat

Methods inherited from class org.apache.log.output.io.WriterTarget

close, setWriter, shutdownWriter, write

Methods inherited from class org.apache.log.output.AbstractOutputTarget

close, doProcessEvent, getFormatter, open, output, setFormatter, write

Methods inherited from class org.apache.log.output.AbstractTarget

close, doProcessEvent, error, getErrorHandler, isOpen, open, processEvent, setErrorHandler

Constructor Details

FileOutputLogTarget

public FileOutputLogTarget()

FileOutputLogTarget

public FileOutputLogTarget(String filename)
            throws IOException

FileOutputLogTarget

public FileOutputLogTarget(String filename,
                           boolean append)
            throws IOException

Method Details

setAppend

public void setAppend(boolean append)

setFilename

public void setFilename(String filename)
            throws IOException
Overwrites the m_output value in the super class through assignment of an OutputStreamWriter based on a supplied file path. Side-effects include the creation of a directory path based relative to the supplied filename.
Parameters:
filename - path and filename for log destination