LOG4CPP::APPENDERSKELETON(3)
okay so welcome to log4cpp::A...derSkeleton(3) from the Library Functions Manual β itβs giving helper-class realness, and weβre gonna get through every single member function together, no cap π
β¨
π NAME π
log4cpp::AppenderSkeleton β AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters. basically itβs the bestie that does the boring threshold/filter admin for you π«Ά
β¨ 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.
π«Ά Public Member Functions inherited from log4cpp::Appender
virtual ~Appender ()β Destructor for Appender.const std::string & getName () constβ Get the name of 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.
π«Ά Protected Member Functions inherited from log4cpp::Appender
Appender (const std::string &name)β Constructor for Appender.
π Additional Inherited Members π
β Static Public Member Functions inherited from log4cpp::Appender
static Appender * getAppender (const std::string &name)β Get a pointer to anexitsingAppender. (yes,exitsingβ Iβm just the messenger π)static bool reopenAll ()β Callreopen()on all existing Appenders.static void closeAll ()β Callreopen()on all existing Appenders. (the original page literally saysreopen()here too β not me, bestie π)
π₯ Detailed Description π₯
AppenderSkeleton is a helper class, simplifying implementation of Appenders: it already takes care of handling of Thresholds and Filters. iconic behavior, honestly π
π 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β TheLoggingEventto log.
Implemented in log4cpp::AbortAppender, log4cpp::BufferingAppender, log4cpp::DailyRollingFileAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::NTEventLogAppender, log4cpp::OstreamAppender, log4cpp::RemoteSyslogAppender, log4cpp::RollingFileAppender, log4cpp::StringQueueAppender, log4cpp::SyslogAppender, and log4cpp::Win32DebugAppender.
𧨠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::AbortAppender, log4cpp::BufferingAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::NTEventLogAppender, log4cpp::OstreamAppender, log4cpp::RemoteSyslogAppender, log4cpp::StringQueueAppender, log4cpp::SyslogAppender, and log4cpp::Win32DebugAppender.
π¦ void log4cpp::AppenderSkeleton::doAppend (const LoggingEvent & event)
virtual
Log in Appender specific way.
Parameters
eventβ TheLoggingEventto log.
Implements log4cpp::Appender.
π Filter * log4cpp::AppenderSkeleton::getFilter ()
virtual
Get the Filter for this appender.
Returns
- the filter, or
NULLif 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
falseif an erroroccuredduring reopening (their spelling, not mine π),trueotherwise.
Implements log4cpp::Appender.
Reimplemented in log4cpp::AbortAppender, log4cpp::FileAppender, log4cpp::IdsaAppender, log4cpp::NTEventLogAppender, log4cpp::OstreamAppender, log4cpp::RemoteSyslogAppender, log4cpp::StringQueueAppender, and log4cpp::SyslogAppender.
πΈ virtual bool log4cpp::AppenderSkeleton::requiresLayout () const
pure virtual
Check if the appender uses a layout.
Returns
trueif the appender implementation requires a layout.
Implements log4cpp::Appender.
Implemented in log4cpp::AbortAppender, log4cpp::IdsaAppender, log4cpp::LayoutAppender, and log4cpp::NTEventLogAppender.
π 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::AbortAppender, log4cpp::IdsaAppender, log4cpp::LayoutAppender, and log4cpp::NTEventLogAppender.
π₯ void log4cpp::AppenderSkeleton::setThreshold (Priority::Value priority)
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.
thatβs the whole page, bestie β source/version situation is log4cpp, Version 1.1; the footer doesnβt show a date, so Iβm not inventing one πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms