log4shib 2.0.0

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
log4shib::Appender Class Referenceabstract

Implement this interface for your own strategies for printing log statements. More...

`#include <Appender.hh>`

Inheritance diagram for log4shib::Appender:
[legend]

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

## Static Public Member Functions
static Appender * | getAppender (const std::string &name)
| Get a pointer to an exitsing Appender. More...
static bool | reopenAll ()
| Call reopen() on all existing Appenders. More...
static void | closeAll ()
| Call reopen() on all existing Appenders. More...

## Protected Member Functions
| Appender (const std::string &name)
| Constructor for Appender. More...

## Detailed Description

Implement this interface for your own strategies for printing log statements.

## Constructor & Destructor Documentation

## ◆ Appender()

log4shib::Appender::Appender | ( | const std::string & | name | ) |
| protected

Constructor for Appender.

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

Parameters

  name | The name of this Appender.

## ◆ ~Appender()

log4shib::Appender::~Appender | ( |  | ) |
| virtual

Destructor for Appender.

## Member Function Documentation

## ◆ close()

virtual void log4shib::Appender::close | ( |  | ) |
| pure virtual

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

Implemented in log4shib::AbortAppender, log4shib::FileAppender, log4shib::IdsaAppender, log4shib::NTEventLogAppender, log4shib::OstreamAppender, log4shib::RemoteSyslogAppender, log4shib::StringQueueAppender, log4shib::SyslogAppender, log4shib::Win32DebugAppender, and log4shib::AppenderSkeleton.

## ◆ closeAll()

void log4shib::Appender::closeAll | ( |  | ) |
| static

Call reopen() on all existing Appenders.

Returns
  true if all Appenders returned true on their reopen() call.

## ◆ doAppend()

virtual void log4shib::Appender::doAppend | ( | const LoggingEvent & | event | ) |
| pure virtual

Log in Appender specific way.

Parameters

  event | The LoggingEvent to log.

Implemented in log4shib::AppenderSkeleton.

## ◆ getAppender()

Appender * log4shib::Appender::getAppender | ( | const std::string & | name | ) |
| static

Get a pointer to an exitsing Appender.

Parameters

  name | The name of the Appender to return.

Returns
  a pointer to an existing Appender, or NULL if no appender with the specfied name exists.

## ◆ getFilter()

virtual Filter * log4shib::Appender::getFilter | ( |  | ) |
| pure virtual

Get the Filter for this appender.

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

Implemented in log4shib::AppenderSkeleton.

## ◆ getName()

const std::string & log4shib::Appender::getName | ( |  | ) | const
| inline

Get the name of this appender.

The name identifies the appender.

Returns
  the name of the appender.

## ◆ getThreshold()

virtual Priority::Value log4shib::Appender::getThreshold | ( |  | ) |
| pure virtual

Get the threshold priority of this Appender.

Returns
  the threshold

Implemented in log4shib::AppenderSkeleton.

## ◆ reopen()

virtual bool log4shib::Appender::reopen | ( |  | ) |
| pure 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.

Implemented in log4shib::AbortAppender, log4shib::AppenderSkeleton, log4shib::FileAppender, log4shib::IdsaAppender, log4shib::NTEventLogAppender, log4shib::OstreamAppender, log4shib::RemoteSyslogAppender, log4shib::StringQueueAppender, and log4shib::SyslogAppender.

## ◆ reopenAll()

bool log4shib::Appender::reopenAll | ( |  | ) |
| static

Call reopen() on all existing Appenders.

Returns
  true if all Appenders returned true on their reopen() call.

## ◆ requiresLayout()

virtual bool log4shib::Appender::requiresLayout | ( |  | ) | const
| pure virtual

Check if the appender uses a layout.

Returns
  true if the appender implementation requires a layout.

Implemented in log4shib::AbortAppender, log4shib::IdsaAppender, log4shib::LayoutAppender, and log4shib::AppenderSkeleton.

## ◆ setFilter()

virtual void log4shib::Appender::setFilter | ( | Filter * | filter | ) |
| pure virtual

Set a Filter for this appender.

Implemented in log4shib::AppenderSkeleton.

## ◆ setLayout()

virtual void log4shib::Appender::setLayout | ( | Layout * | layout | ) |
| pure virtual

Set the Layout for this appender.

Parameters

  layout | The layout to use.

Implemented in log4shib::AbortAppender, log4shib::IdsaAppender, log4shib::AppenderSkeleton, and log4shib::LayoutAppender.

## ◆ setThreshold()

virtual void log4shib::Appender::setThreshold | ( | Priority::Value | priority | ) |
| pure 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.

Implemented in log4shib::AppenderSkeleton.

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

- Appender.hh
- Appender.cpp