log4cpp::SyslogAppender(3)

πŸ“¦
version 1.1.4 Β· 4 versions
, in opensuse-leap 16.0

log4cpp::SyslogAppender(3) β€” Library Functions Manual πŸ’–

Okay bestie, this is the log4cpp::SyslogAppender page, and it’s basically the little bridge that sends LoggingEvents straight to your local syslog system. No cap. πŸ¦‹

🌸 NAME 🌸

log4cpp::SyslogAppender β€” a SyslogAppender that sends LoggingEvents to the local syslog system. Periodt. πŸ’…

✨ SYNOPSIS ✨

#include <SyslogAppender.hh>

Inherits log4cpp::LayoutAppender.

πŸ’… Public Member Functions πŸ’…

  • SyslogAppender (const std::string &name, const std::string &syslogName, int facility=LOG_USER) β€” instantiate a SyslogAppender with the given name, syslogName, and facility for syslog.
  • virtual ~SyslogAppender () β€” the virtual destructor.
  • virtual bool reopen () β€” calls closelog(3) and openlog(3).
  • virtual void close () β€” calls closelog(3) to close the syslog file descriptor.

πŸ¦‹ Public Member Functions inherited from log4cpp::LayoutAppender πŸ¦‹

  • LayoutAppender (const std::string &name) β€” constructor.
  • virtual ~LayoutAppender () β€” virtual destructor.
  • virtual bool requiresLayout () const β€” check if the appender requires a layout.
  • virtual void setLayout (Layout *layout=NULL) β€” set the Layout for this appender.

🌈 Public Member Functions inherited from log4cpp::AppenderSkeleton 🌈

  • virtual ~AppenderSkeleton () β€” destructor for AppenderSkeleton.
  • virtual void doAppend (const LoggingEvent &event) β€” log in an appender-specific way.
  • 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.

⭐ Static Public Member Functions ⭐

  • static int toSyslogPriority (Priority::Value priority) β€” translates a log4cpp priority to a syslog priority.

πŸ’œ Static Public Member Functions inherited from log4cpp::Appender πŸ’œ

  • static Appender * getAppender (const std::string &name) β€” get a pointer to an exitsing Appender.
  • static bool reopenAll () β€” call reopen() on all existing Appenders.
  • static void closeAll () β€” call reopen() on all existing Appenders.

🫢 Protected Member Functions 🫢

  • virtual void open () β€” calls openlog(3).
  • virtual void _append (const LoggingEvent &event) β€” sends a LoggingEvent to syslog.

🌸 Protected Member Functions inherited from log4cpp::LayoutAppender 🌸

  • Layout & _getLayout () β€” return the layout of the appender.

πŸ¦‹ Protected Member Functions inherited from log4cpp::AppenderSkeleton πŸ¦‹

  • AppenderSkeleton (const std::string &name) β€” constructor for AppenderSkeleton.

πŸ’« Protected Member Functions inherited from log4cpp::Appender πŸ’«

  • Appender (const std::string &name) β€” constructor for Appender.

πŸ“ Protected Attributes πŸ“

  • const std::string _syslogName
  • int _facility

🌟 Additional Inherited Members 🌟

πŸ‘‘ Public Types inherited from log4cpp::LayoutAppender πŸ‘‘

  • typedef BasicLayout DefaultLayoutType

πŸ’– Detailed Description πŸ’–

SyslogAppender sends LoggingEvents to the local syslog system. That’s the whole mood. πŸ’«

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

log4cpp::SyslogAppender::SyslogAppender (const std::string & name, const std::string & syslogName, int facility = LOG_USER)

Instantiate a SyslogAppender with the given name, syslogName, and facility for syslog.

🚨 caveat, bestie: the C syslog API is process global, so instantion of a second SyslogAppender will 'overwrite' the syslog name of the first. πŸ’€

Parameters

  • name β€” the name of the Appender.
  • syslogName β€” the ident parameter in the openlog(3) call.
  • facility β€” the syslog facility to log to. Defaults to LOG_USER.

virtual log4cpp::SyslogAppender::~SyslogAppender () β€” [virtual]

Virtual destructor.

🌈 Member Function Documentation 🌈

virtual void log4cpp::SyslogAppender::_append (const LoggingEvent & event) β€” [protected], [virtual]

Sends a LoggingEvent to syslog.

Parameters

  • event β€” the LoggingEvent to log.

Implements log4cpp::AppenderSkeleton.

virtual void log4cpp::SyslogAppender::close () β€” [virtual]

Calls closelog(3) to close the syslog file descriptor.

Implements log4cpp::AppenderSkeleton.

virtual void log4cpp::SyslogAppender::open () β€” [protected], [virtual]

Calls openlog(3).

virtual bool log4cpp::SyslogAppender::reopen () β€” [virtual]

Calls closelog(3) and openlog(3).

Reimplemented from log4cpp::AppenderSkeleton.

int log4cpp::SyslogAppender::toSyslogPriority (Priority::Value priority) β€” [static]

Translates a log4cpp priority to a syslog priority.

Parameters

  • priority β€” the log4cpp priority.

Returns

  • the syslog priority.

🧚 Member Data Documentation 🧚

  • int log4cpp::SyslogAppender::_facility β€” [protected]
  • const std::string log4cpp::SyslogAppender::_syslogName β€” [protected]

πŸ”₯ Author πŸ”₯

Generated automatically by Doxygen for log4cpp from the source code. Slay, automation. πŸ€–πŸ’–


source: log4cpp · version: 1.1 · manual page: log4cpp::SyslogAppender(3) · date: the footer has no date, bestie 🫢
πŸ“¦ where this page comes from