log4shib::...ogAppender(3)
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 anNTEventLogAppenderwith the givennameandsource.virtual ~NTEventLogAppender ()β virtual destructor. Minimal, but iconic.virtual bool reopen ()β callsopen()andclose().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 theLayoutfor this appender.
Public Member Functions inherited from log4shib::AppenderSkeleton π¦
virtual ~AppenderSkeleton ()β destructor forAppenderSkeleton.virtual void doAppend (const LoggingEvent &event)β log in Appender-specific way.virtual void setThreshold (Priority::Value priority)β set the threshold priority of thisAppender.virtual Priority::Value getThreshold ()β get the threshold priority of thisAppender.virtual void setFilter (Filter *filter)β set aFilterfor this appender.virtual Filter * getFilter ()β get theFilterfor this appender.
Public Member Functions inherited from log4shib::Appender π
virtual ~Appender ()β destructor forAppender.const std::string & getName () constβ get the name of this appender.
Protected Member Functions π«Ά
WORD getCategory (Priority::Value priority)β convert log4shibPriorityto an EventLog category.WORD getType (Priority::Value priority)β convert log4shibPriorityto 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 aLoggingEventto 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 forAppenderSkeleton.
Protected Member Functions inherited from log4shib::Appender π
Appender (const std::string &name)β constructor forAppender.
Protected Attributes π
HANDLE _hEventSourcestd::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 existingAppender.static bool reopenAll ()β callreopen()on all existingAppenders.static void closeAll ()β callreopen()on all existingAppenders. Yes, the page literally saysreopen()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
LoggingEventto 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. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· LGPL-2.1-only
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· LGPL-2.1-only
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· LGPL-2.1-only
- opensuse-leap 16.0: liblog4shib-devel 2.0.1-160000.3.2 Β· 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