18#ifndef _LOG4CXX_WRITER_APPENDER_H
19#define _LOG4CXX_WRITER_APPENDER_H
34 struct WriterAppenderPriv;
46#if LOG4CXX_ABI_VERSION <= 15
AppenderSkeleton(LOG4CXX_PRIVATE_PTR(AppenderSkeletonPrivate) priv)
WriterAppender appends log events to a standard output stream.
Definition writerappender.h:32
LogString getEncoding() const
The current encoding value.
virtual void writeFooter(helpers::Pool &p)
Write a footer as produced by the embedded layout's Layout::appendFooter method.
void append(const spi::LoggingEventPtr &event, helpers::Pool &p) override
This method is called by the AppenderSkeleton::doAppend method.
virtual void subAppend(const spi::LoggingEventPtr &event, helpers::Pool &p)
Actual writing occurs here.
virtual helpers::WriterPtr createWriter(LOG4CXX_16_CONST helpers::OutputStreamPtr &os)
Returns an OutputStreamWriter when passed an OutputStream.
void setOption(const LogString &option, const LogString &value) override
Set option to value.
void setWriterInternal(const helpers::WriterPtr &writer)
Set the writer.
void setImmediateFlush(bool value)
If the ImmediateFlush option is set to true, the appender will flush at the end of each write.
const helpers::WriterPtr getWriter() const
void closeWriter()
Close the underlying log4cxx::helpers::Writer.
WriterAppender(const LayoutPtr &layout)
void setWriter(const helpers::WriterPtr &writer)
bool requiresLayout() const override
Configurators call this method to determine if the appender requires a layout.
void activateOptions(helpers::Pool &pool) override
Derived appenders should override this method if option structure requires it.
bool getImmediateFlush() const
Returns value of the ImmediateFlush option.
virtual void writeHeader(helpers::Pool &p)
Write a header as produced by the embedded layout's Layout::appendHeader method.
void close() override
Close this appender instance.
WriterAppender(std::unique_ptr< WriterAppenderPriv > priv)
WriterAppender(const LayoutPtr &layout, helpers::WriterPtr &writer)
virtual bool checkEntryConditions() const
This method determines if there is a sense in attempting to append.
void setEncoding(const LogString &value)
Set the encoding to value.
WriterAppender()
This default constructor does nothing.
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition appender.h:32
std::basic_string< logchar > LogString
Definition logstring.h:60
std::shared_ptr< Layout > LayoutPtr
Definition appender.h:42
LOG4CXX_PTR_DEF(Appender)
#define LOG4CXX_CAST_ENTRY(Interface)
Definition object.h:158
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition object.h:39
#define END_LOG4CXX_CAST_MAP()
Definition object.h:152
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition object.h:164
#define BEGIN_LOG4CXX_CAST_MAP()
Definition object.h:146
#define LOG4CXX_16_CONST
Definition outputstreamwriter.h:28