Public Member Functions | Protected Member Functions | Private Attributes
log4cpp::AppenderSkeleton Class Reference

#include <AppenderSkeleton.hh>

Inheritance diagram for log4cpp::AppenderSkeleton:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void close ()=0
virtual void doAppend (const LoggingEvent &event)
virtual FiltergetFilter ()
virtual Priority::Value getThreshold ()
virtual bool reopen ()
virtual bool requiresLayout () const =0
virtual void setFilter (Filter *filter)
virtual void setLayout (Layout *layout)=0
virtual void setThreshold (Priority::Value priority)
virtual ~AppenderSkeleton ()

Protected Member Functions

virtual void _append (const LoggingEvent &event)=0
 AppenderSkeleton (const std::string &name)

Private Attributes

Filter_filter
Priority::Value _threshold

Detailed Description

AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters.

Definition at line 24 of file AppenderSkeleton.hh.


Constructor & Destructor Documentation

log4cpp::AppenderSkeleton::AppenderSkeleton ( const std::string &  name) [protected]

Constructor for AppenderSkeleton. Will only be used in getAppender() (and in derived classes of course).

Parameters:
nameThe name of this Appender.

Definition at line 15 of file AppenderSkeleton.cpp.

Destructor for AppenderSkeleton.

Definition at line 21 of file AppenderSkeleton.cpp.


Member Function Documentation

virtual void log4cpp::AppenderSkeleton::_append ( const LoggingEvent event) [protected, pure virtual]
virtual void log4cpp::AppenderSkeleton::close ( ) [pure virtual]

Release any resources allocated within the appender such as file handles, network connections, etc.

Implements log4cpp::Appender.

Implemented in log4cpp::RemoteSyslogAppender, log4cpp::SyslogAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, log4cpp::OstreamAppender, and log4cpp::BufferingAppender.

void log4cpp::AppenderSkeleton::doAppend ( const LoggingEvent event) [virtual]

Log in Appender specific way.

Parameters:
eventThe LoggingEvent to log.

Implements log4cpp::Appender.

Definition at line 30 of file AppenderSkeleton.cpp.

Get the Filter for this appender.

Returns:
the filter, or NULL if no filter has been set.

Implements log4cpp::Appender.

Definition at line 55 of file AppenderSkeleton.cpp.

Get the threshold priority of this Appender.

Returns:
the threshold

Implements log4cpp::Appender.

Definition at line 42 of file AppenderSkeleton.cpp.

Reopens the output destination of this Appender, e.g. the logfile or TCP socket.

Returns:
false if an error occured during reopening, true otherwise.

Implements log4cpp::Appender.

Reimplemented in log4cpp::RemoteSyslogAppender, log4cpp::SyslogAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, and log4cpp::OstreamAppender.

Definition at line 26 of file AppenderSkeleton.cpp.

virtual bool log4cpp::AppenderSkeleton::requiresLayout ( ) const [pure virtual]

Check if the appender uses a layout.

Returns:
true if the appender implementation requires a layout.

Implements log4cpp::Appender.

Implemented in log4cpp::IdsaAppender, log4cpp::LayoutAppender, and log4cpp::AbortAppender.

void log4cpp::AppenderSkeleton::setFilter ( Filter filter) [virtual]

Set a Filter for this appender.

Implements log4cpp::Appender.

Definition at line 46 of file AppenderSkeleton.cpp.

virtual void log4cpp::AppenderSkeleton::setLayout ( Layout layout) [pure virtual]

Set the Layout for this appender.

Parameters:
layoutThe layout to use.

Implements log4cpp::Appender.

Implemented in log4cpp::IdsaAppender, log4cpp::AbortAppender, and log4cpp::LayoutAppender.

Set the threshold priority of this Appender. The Appender will not appender LoggingEvents with a priority lower than the threshold. Use Priority::NOTSET to disable threshold checking.

Parameters:
priorityThe priority to set.

Implements log4cpp::Appender.

Definition at line 38 of file AppenderSkeleton.cpp.


Member Data Documentation

Definition at line 107 of file AppenderSkeleton.hh.

Definition at line 106 of file AppenderSkeleton.hh.


The documentation for this class was generated from the following files:


log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Aug 14 2016 03:18:26