18#ifndef _LOG4CXX_FILE_APPENDER_H
19#define _LOG4CXX_FILE_APPENDER_H
46 struct FileAppenderPriv;
75 ,
bool appendToExistingFile = true
76 ,
bool useBufferedOutput = false
FileAppender appends log events to a file.
Definition fileappender.h:44
void setOption(const LogString &option, const LogString &value) override
Override this method to set option to value.
void setAppend(bool newValue)
Set file open mode to newValue.
void setBufferSize(size_t newValue)
Use newValue, a value up to 2^31, as the size of the output buffer.
void setBufferedIO(bool newValue)
Set buffered output behavior to newValue.
static const size_t MaxBufferedByteCount
Definition fileappender.h:186
LogString getFile() const
Returns the value of the File option.
void setLazyFileCreation(bool newValue)
Create the file when the first message is written (rather than in activateOptions) if newValue is tru...
void activateOptions() override
Derived appenders should override this method if option structure requires it.
bool getLazyFileCreation() const
Get the value of the LazyFileCreation option.
static const int DefaultBufferedByteCount
Definition fileappender.h:224
static LogString stripDuplicateBackslashes(const LogString &name)
Replaces double backslashes with single backslashes for compatibility with paths from earlier XML con...
FileAppender()
An unconfigured Appender.
bool getBufferedIO() const
Get the value of the BufferedIO option.
void setFile(const LogString &file)
The File property takes a string value which should be the name of the file to append to.
int getBufferedSeconds() const
Get the number of seconds between file writes when the BufferedIO option is true.
bool getAppend() const
Returns the value of the Append option.
void setBufferedSeconds(int newValue)
Flush the output buffer every newValue seconds.
size_t getBufferSize() const
Get the size of the IO buffer.
WriterAppender()
An uninitialised Appender.
std::basic_string< logchar > LogString
Definition logstring.h:51
std::shared_ptr< Layout > LayoutPtr
Definition appender.h:42
LOG4CXX_PTR_DEF(Appender)
#define LOG4CXX_CAST_ENTRY(Interface)
Definition object.h:153
#define END_LOG4CXX_CAST_MAP()
Definition object.h:147
#define DECLARE_LOG4CXX_OBJECT(object)
Definition object.h:41
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition object.h:159
#define BEGIN_LOG4CXX_CAST_MAP()
Definition object.h:141