log4shib::...ogAppender(3)

πŸ“¦ version 2.0.1, in opensuse-leap 16.0

log4shib::...ogAppender(3) β€” Library Functions Manual β€” okay bestie, this is the whole page, and it’s giving β€œWindows event log but make it documentation.” πŸ’–

NAME 🌸

log4shib::NTEventLogAppender is an Appender that sends LoggingEvents to the Windows event log. That’s the whole vibe, no cap.

SYNOPSIS ✨

#include <NTEventLogAppender.hh>

Inherits log4shib::LayoutAppender.

Public Member Functions πŸ’…

  • NTEventLogAppender (const std::string &name, const std::string &sourceName) β€” instantiate an NTEventLogAppender with the given name and source.
  • virtual ~NTEventLogAppender () β€” virtual destructor. Minimal, but iconic.
  • virtual bool reopen () β€” calls open() and close().
  • virtual void close () β€” release any resources allocated within the appender such as file handles, network connections, etc.

Public Member Functions inherited from log4shib::LayoutAppender πŸŽ€

  • LayoutAppender (const std::string &name) β€” constructor. The page gives no extra notes here.
  • virtual ~LayoutAppender () β€” virtual destructor. No extra notes in the page.
  • 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 log4shib::AppenderSkeleton πŸ¦‹

  • virtual ~AppenderSkeleton () β€” destructor for AppenderSkeleton.
  • virtual void doAppend (const LoggingEvent &event) β€” log in 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 log4shib::Appender 🌈

  • virtual ~Appender () β€” destructor for Appender.
  • const std::string & getName () const β€” get the name of this appender.

Protected Member Functions 🫢

  • WORD getCategory (Priority::Value priority) β€” convert log4shib Priority to an EventLog category.
  • WORD getType (Priority::Value priority) β€” convert log4shib Priority to an EventLog type.
  • HKEY regGetKey (TCHAR *subkey, DWORD *disposition) β€” no extra notes in the page.
  • void regSetString (HKEY hkey, const TCHAR *name, const TCHAR *value) β€” no extra notes in the page.
  • void regSetDword (HKEY hkey, const TCHAR *name, DWORD value) β€” no extra notes in the page.
  • void addRegistryInfo (const char *source) β€” no extra notes in the page.
  • virtual void open () β€” no extra notes in the page.
  • virtual void _append (const LoggingEvent &event) β€” sends a LoggingEvent to NT Event log.

Protected Member Functions inherited from log4shib::LayoutAppender 🧚

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

Protected Member Functions inherited from log4shib::AppenderSkeleton πŸ“

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

Protected Member Functions inherited from log4shib::Appender πŸ’œ

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

Protected Attributes πŸŽ€

  • HANDLE _hEventSource
  • std::string _strSourceName

Additional Inherited Members ⭐

Public Types inherited from log4shib::LayoutAppender

  • typedef BasicLayout DefaultLayoutType

Static Public Member Functions inherited from log4shib::Appender

  • static Appender * getAppender (const std::string &name) β€” get a pointer to an existing Appender.
  • static bool reopenAll () β€” call reopen() on all existing Appenders.
  • static void closeAll () β€” call reopen() on all existing Appenders. Yes, the page literally says reopen() here β€” iykyk.

Detailed Description πŸ¦‹

NTEventLogAppender is an Appender that sends LoggingEvents to the Windows event log. Main character behavior, honestly. πŸ’…

Building log4shib.dsp/log4shibDLL.dsp creates the resource DLL NTEventLogAppender.dll. Do not forget to place this DLL in a directory that is on the PATH of the Windows system. Otherwise, the category and message will not display correctly in Event Viewer.

⚠️ NB: This class is only available on Win32 platforms. Not a cross-platform girlie, bestie. πŸͺŸ

Constructor & Destructor Documentation 🫢

πŸŽ€ Constructor β€” log4shib::NTEventLogAppender::NTEventLogAppender

log4shib::NTEventLogAppender::NTEventLogAppender (const std::string & name,
    const std::string & sourceName)

Instantiate an NTEventLogAppender with given name and source.

Parameters

  • name β€” the name of the Appender
  • sourceName β€” the source name to log

πŸŽ€ Destructor β€” log4shib::NTEventLogAppender::~NTEventLogAppender

log4shib::NTEventLogAppender::~NTEventLogAppender () [virtual]

Virtual destructor. The page gives no extra prose here β€” it’s giving minimal.

Member Function Documentation ⭐

πŸ’« _append

void log4shib::NTEventLogAppender::_append (const LoggingEvent & event) [protected],  [virtual]

Sends a LoggingEvent to NT Event log.

Parameters

  • event β€” the LoggingEvent to log.

Implements log4shib::AppenderSkeleton.

πŸ’« addRegistryInfo

void log4shib::NTEventLogAppender::addRegistryInfo (const char * source) [protected]

Protected helper. The page gives no extra notes here, bestie.

πŸ’« close

void log4shib::NTEventLogAppender::close () [virtual]

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

Implements log4shib::AppenderSkeleton.

πŸ’« getCategory

WORD log4shib::NTEventLogAppender::getCategory (Priority::Value priority) [protected]

Convert log4shib Priority to an EventLog category. Each category is backed by a message resource so that proper category names will be displayed in the NT Event Viewer.

πŸ’« getType

WORD log4shib::NTEventLogAppender::getType (Priority::Value priority) [protected]

Convert log4shib Priority to an EventLog type. The log4shib package supports 8 defined priorites, but the NT EventLog only knows 3 event types of interest to us: ERROR, WARNING, and INFO.

πŸ’« open

void log4shib::NTEventLogAppender::open () [protected],  [virtual]

No extra notes in the page β€” just the signature doing its thing.

πŸ’« regGetKey

HKEY log4shib::NTEventLogAppender::regGetKey (TCHAR * subkey, DWORD * disposition) [protected]

No extra notes in the page.

πŸ’« regSetDword

void log4shib::NTEventLogAppender::regSetDword (HKEY hkey, const TCHAR * name, DWORD value) [protected]

No extra notes in the page.

πŸ’« regSetString

void log4shib::NTEventLogAppender::regSetString (HKEY hkey, const TCHAR * name, const TCHAR * value) [protected]

No extra notes in the page.

πŸ’« reopen

bool log4shib::NTEventLogAppender::reopen () [virtual]

Calls open() and close().

Reimplemented from log4shib::AppenderSkeleton.

Member Data Documentation πŸ“

  • HANDLE log4shib::NTEventLogAppender::_hEventSource [protected] β€” no extra notes in the page.
  • std::string log4shib::NTEventLogAppender::_strSourceName [protected] β€” no extra notes in the page.

Author πŸ‘‘

Generated automatically by Doxygen for log4shib from the source code. Auto-gen royalty, honestly. πŸ‘‘


okay bestie, that’s the whole page β€” footer source/version: log4shib, Version 2.0.1; the footer’s date slot is literally empty, so no date to quote and we’re not inventing one. πŸ’–βœ¨