18#ifndef _LOG4CXX_WRITER_APPENDER_H
19#define _LOG4CXX_WRITER_APPENDER_H
39 struct WriterAppenderPriv;
52 LOG4CXX_NS::
helpers::WriterPtr& writer);
AppenderSkeleton(LOG4CXX_PRIVATE_PTR(AppenderSkeletonPrivate) priv)
WriterAppender appends log events to a standard output stream.
Definition writerappender.h:37
const log4cxx::helpers::WriterPtr getWriter() const
LogString getEncoding() const
The current encoding value.
virtual void writeHeader(log4cxx::helpers::Pool &p)
Write a header as produced by the embedded layout's Layout::appendHeader method.
void append(const spi::LoggingEventPtr &event, helpers::Pool &p) override
This method is called by the AppenderSkeleton::doAppend method.
void setWriter(const log4cxx::helpers::WriterPtr &writer)
void setOption(const LogString &option, const LogString &value) override
Set option to value.
void setImmediateFlush(bool value)
If the ImmediateFlush option is set to true, the appender will flush at the end of each write.
virtual helpers::WriterPtr createWriter(helpers::OutputStreamPtr &os)
Returns an OutputStreamWriter when passed an OutputStream.
void closeWriter()
Close the underlying log4cxx::helpers::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.
virtual void subAppend(const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p)
Actual writing occurs here.
bool getImmediateFlush() const
Returns value of the ImmediateFlush option.
virtual void writeFooter(log4cxx::helpers::Pool &p)
Write a footer as produced by the embedded layout's Layout::appendFooter method.
void close() override
Close this appender instance.
void setWriterInternal(const log4cxx::helpers::WriterPtr &writer)
Set the 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.
Definition propertysetter.h:27
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