.TH "log4tango::Appender" 3 "Fri Nov 11 2022" "Version 5.0.2" "log4tango" \" -*- nroff -*- .ad l .nh .SH NAME log4tango::Appender .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherited by \fBlog4tango::LayoutAppender\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fB~Appender\fP ()" .br .RI "Destructor for \fBAppender\fP\&. " .ti -1c .RI "int \fBappend\fP (const \fBLoggingEvent\fP &event)" .br .RI "Log in \fBAppender\fP specific way\&. " .ti -1c .RI "virtual bool \fBreopen\fP (void)" .br .RI "Reopens the output destination of this \fBAppender\fP, e\&.g\&. " .ti -1c .RI "virtual void \fBclose\fP (void)=0" .br .RI "Release any resources allocated within the appender such as file handles, network connections, etc\&. " .ti -1c .RI "virtual bool \fBrequires_layout\fP (void) const =0" .br .RI "Check if the appender uses a layout\&. " .ti -1c .RI "virtual void \fBset_layout\fP (\fBLayout\fP *layout=0)=0" .br .RI "Change the layout\&. " .ti -1c .RI "const std::string & \fBget_name\fP (void) const" .br .RI "Returns this appender name\&. " .ti -1c .RI "virtual bool \fBis_valid\fP (void) const" .br .RI "Check if the appender is valid (for instance the underlying connection is ok) This default implementation always return true\&. " .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBAppender\fP (const std::string &name)" .br .RI "Constructor for \fBAppender\fP\&. " .ti -1c .RI "virtual void \fBlevel_changed\fP (\fBLevel::Value\fP new_level)" .br .RI "Inform an appender that its \fBLogger\fP's logging level has changed\&. " .ti -1c .RI "virtual int \fB_append\fP (const \fBLoggingEvent\fP &event)=0" .br .RI "Log in \fBAppender\fP specific way\&. " .in -1c .SS "Friends" .in +1c .ti -1c .RI "class \fBLogger\fP" .br .in -1c .SH "Constructor & Destructor Documentation" .PP .SS "log4tango::Appender::Appender (const std::string & name)\fC [protected]\fP" .PP Constructor for \fBAppender\fP\&. Will only be used in getAppender() (and in derived classes of course)\&. .PP \fBParameters\fP .RS 4 \fIname\fP The name of this \fBAppender\fP\&. .RE .PP .SS "log4tango::Appender::~Appender ()\fC [virtual]\fP" .PP Destructor for \fBAppender\fP\&. .SH "Member Function Documentation" .PP .SS "virtual int log4tango::Appender::_append (const \fBLoggingEvent\fP & event)\fC [protected]\fP, \fC [pure virtual]\fP" .PP Log in \fBAppender\fP specific way\&. Subclasses of \fBAppender\fP should implement this method to perform actual logging\&. .PP \fBParameters\fP .RS 4 \fIevent\fP The \fBLoggingEvent\fP to log\&. .RE .PP .PP Implemented in \fBlog4tango::FileAppender\fP, \fBlog4tango::OstreamAppender\fP, and \fBlog4tango::RollingFileAppender\fP\&. .SS "int log4tango::Appender::append (const \fBLoggingEvent\fP & event)\fC [inline]\fP" .PP Log in \fBAppender\fP specific way\&. Returns -1 on error, 0 otherwise\&. .PP \fBParameters\fP .RS 4 \fIevent\fP The \fBLoggingEvent\fP to log\&. .RE .PP .SS "virtual void log4tango::Appender::close (void)\fC [pure virtual]\fP" .PP Release any resources allocated within the appender such as file handles, network connections, etc\&. .PP Implemented in \fBlog4tango::OstreamAppender\fP, and \fBlog4tango::FileAppender\fP\&. .SS "const std::string & log4tango::Appender::get_name (void) const\fC [inline]\fP" .PP Returns this appender name\&. .SS "bool log4tango::Appender::is_valid (void) const\fC [virtual]\fP" .PP Check if the appender is valid (for instance the underlying connection is ok) This default implementation always return true\&. Overload to define your own behaviour\&. .PP \fBReturns\fP .RS 4 true if the appender is valid, false otherwise\&. .RE .PP .PP Reimplemented in \fBlog4tango::FileAppender\fP\&. .SS "void log4tango::Appender::level_changed (\fBLevel::Value\fP new_level)\fC [protected]\fP, \fC [virtual]\fP" .PP Inform an appender that its \fBLogger\fP's logging level has changed\&. The default implementation does nothing\&. .PP \fBParameters\fP .RS 4 \fInew_level\fP The new \fBLogger\fP's level\&. .RE .PP .SS "bool log4tango::Appender::reopen (void)\fC [virtual]\fP" .PP Reopens the output destination of this \fBAppender\fP, e\&.g\&. the logfile or TCP socket\&. .PP \fBReturns\fP .RS 4 false if an error occurred during reopening, true otherwise\&. .RE .PP .PP Reimplemented in \fBlog4tango::OstreamAppender\fP, and \fBlog4tango::FileAppender\fP\&. .SS "virtual bool log4tango::Appender::requires_layout (void) const\fC [pure virtual]\fP" .PP Check if the appender uses a layout\&. .PP \fBReturns\fP .RS 4 true if the appender implementation requires a layout\&. .RE .PP .PP Implemented in \fBlog4tango::LayoutAppender\fP\&. .SS "virtual void log4tango::Appender::set_layout (\fBLayout\fP * layout = \fC0\fP)\fC [pure virtual]\fP" .PP Change the layout\&. .PP Implemented in \fBlog4tango::LayoutAppender\fP\&. .SH "Friends And Related Function Documentation" .PP .SS "friend class \fBLogger\fP\fC [friend]\fP" .SH "Author" .PP Generated automatically by Doxygen for log4tango from the source code\&.