log4cpp::AppenderSkeleton (3) - Linux Manuals

NAME

log4cpp::AppenderSkeleton -

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

SYNOPSIS


#include <AppenderSkeleton.hh>

Inherits log4cpp::Appender.

Inherited by log4cpp::AbortAppender, log4cpp::IdsaAppender, log4cpp::LayoutAppender, and log4cpp::NTEventLogAppender.

Public Member Functions


virtual ~AppenderSkeleton ()
Destructor for AppenderSkeleton.
virtual void doAppend (const LoggingEvent &event)
Log in Appender specific way.
virtual bool reopen ()
Reopens the output destination of this Appender, e.g.
virtual void close ()=0
Release any resources allocated within the appender such as file handles, network connections, etc.
virtual bool requiresLayout () const =0
Check if the appender uses a layout.
virtual void setLayout (Layout *layout)=0
Set the Layout for this appender.
virtual void setThreshold (Priority::Value priority)
Set the threshold priority of this Appender.
virtual Priority::Value getThreshold ()
Get the threshold priority of this Appender.
virtual void setFilter (Filter *filter)
Set a Filter for this appender.
virtual Filter * getFilter ()
Get the Filter for this appender.

Protected Member Functions


AppenderSkeleton (const std::string &name)
Constructor for AppenderSkeleton.
virtual void _append (const LoggingEvent &event)=0
Log in Appender specific way.

Additional Inherited Members

Detailed Description

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

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:

name The name of this Appender.

log4cpp::AppenderSkeleton::~AppenderSkeleton () [virtual]

Destructor for AppenderSkeleton.

Member Function Documentation

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

Log in Appender specific way. Subclasses of Appender should implement this method to perform actual logging.

Parameters:

event The LoggingEvent to log.

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

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::NTEventLogAppender, log4cpp::SyslogAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::Win32DebugAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, log4cpp::OstreamAppender, and log4cpp::BufferingAppender.

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

Log in Appender specific way.

Parameters:

event The LoggingEvent to log.

Implements log4cpp::Appender.

Filter * log4cpp::AppenderSkeleton::getFilter () [virtual]

Get the Filter for this appender.

Returns:

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

Implements log4cpp::Appender.

Priority::Value log4cpp::AppenderSkeleton::getThreshold () [virtual]

Get the threshold priority of this Appender.

Returns:

the threshold

Implements log4cpp::Appender.

bool log4cpp::AppenderSkeleton::reopen () [virtual]

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::NTEventLogAppender, log4cpp::SyslogAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::StringQueueAppender, log4cpp::AbortAppender, and log4cpp::OstreamAppender.

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::NTEventLogAppender, log4cpp::IdsaAppender, log4cpp::LayoutAppender, and log4cpp::AbortAppender.

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

Set a Filter for this appender.

Implements log4cpp::Appender.

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

Set the Layout for this appender.

Parameters:

layout The layout to use.

Implements log4cpp::Appender.

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

void log4cpp::AppenderSkeleton::setThreshold (Priority::Valuepriority) [virtual]

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:

priority The priority to set.

Implements log4cpp::Appender.

Author

Generated automatically by Doxygen for log4cpp from the source code.