public class ResourceAppender extends org.apache.log4j.WriterAppender implements AppenderState
Constructor and Description |
---|
ResourceAppender(org.apache.log4j.Layout layout,
Resource res,
Charset charset,
boolean append,
boolean bufferedIO,
int timeout,
int bufferSize,
RetireListener listener)
Instantiate a
FileAppender and open the file
designated by filename . |
ResourceAppender(org.apache.log4j.Layout layout,
Resource res,
Charset charset,
boolean append,
int timeout,
RetireListener listener) |
ResourceAppender(org.apache.log4j.Layout layout,
Resource res,
Charset charset,
boolean append,
RetireListener listener)
Instantiate a FileAppender and open the file designated by
filename . |
ResourceAppender(org.apache.log4j.Layout layout,
Resource res,
Charset charset,
RetireListener listener)
Instantiate a FileAppender and open the file designated by
filename . |
Modifier and Type | Method and Description |
---|---|
boolean |
getAppend()
Returns the value of the Append option.
|
boolean |
getBufferedIO()
Get the value of the BufferedIO option.
|
int |
getBufferSize()
Get the size of the IO buffer.
|
Resource |
getResource()
Returns the value of the File option.
|
boolean |
isClosed() |
activateOptions, append, close, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter
public ResourceAppender(org.apache.log4j.Layout layout, Resource res, Charset charset, RetireListener listener) throws IOException
filename
. The opened filename will become the output
destination for this appender.
The file will be appended to.
IOException
public ResourceAppender(org.apache.log4j.Layout layout, Resource res, Charset charset, boolean append, RetireListener listener) throws IOException
filename
. The opened filename will become the output
destination for this appender.
If the append
parameter is true, the file will be
appended to. Otherwise, the file designated by
filename
will be truncated before being opened.
IOException
public ResourceAppender(org.apache.log4j.Layout layout, Resource res, Charset charset, boolean append, int timeout, RetireListener listener) throws IOException
IOException
public ResourceAppender(org.apache.log4j.Layout layout, Resource res, Charset charset, boolean append, boolean bufferedIO, int timeout, int bufferSize, RetireListener listener) throws IOException
FileAppender
and open the file
designated by filename
. The opened filename will
become the output destination for this appender.
If the append
parameter is true, the file will be
appended to. Otherwise, the file designated by
filename
will be truncated before being opened.
If the bufferedIO
parameter is true
,
then buffered IO will be used to write to the output file.
IOException
public boolean getAppend()
public Resource getResource()
public boolean getBufferedIO()
BufferedIO will significatnly increase performance on heavily loaded systems.
public int getBufferSize()
public boolean isClosed()
isClosed
in interface AppenderState
Copyright © 2015 Lucee