LOG4CPP::NTEVENTLOGAPPENDER(3)
π log4cpp::NTEventLogAppender(3) β Library Functions Manual π
okay bestie, welcome to the Library Functions Manual page for log4cpp::NTEventLogAppender(3). We're gonna get you comfy with this Windows-event-log appender, no cap. π
β¨ NAME β¨
log4cpp::NTEventLogAppender β an Appender that sends LoggingEvents to the Windows event log. π
πΈ SYNOPSIS πΈ
#include <NTEventLogAppender.hh>
Inherits log4cpp::AppenderSkeleton.
π Public Member Functions π
NTEventLogAppender (const std::string &name, const std::string &sourceName)β instantiate anNTEventLogAppenderwith the givennameandsource.virtual ~NTEventLogAppender ()β the virtual destructor.virtual bool reopen ()β callsopen()andclose().virtual void close ()β release any resources allocated within the appender such as file handles, network connections, etc.virtual bool requiresLayout () constβ theNTEventLogAppenderdoes its own Layout.virtual void setLayout (Layout *layout)β set the Layout for this appender.
π¦ Public Member Functions inherited from log4cpp::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 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 forAppender.const std::string &getName () constβ get the name of this appender.
π«Ά Protected Member Functions π«Ά
WORD getCategory (Priority::Value priority)β convert log4cpp Priority to an EventLog category.WORD getType (Priority::Value priority)β convert log4cpp Priority to an EventLog type.HKEY regGetKey (TCHAR *subkey, DWORD *disposition)β protected helper, no extra deets on the page.void regSetString (HKEY hkey, TCHAR *name, TCHAR *value)β protected helper, no extra deets on the page.void regSetDword (HKEY hkey, TCHAR *name, DWORD value)β protected helper, no extra deets on the page.void addRegistryInfo (const char *source)β protected helper, no extra deets on the page.virtual void open ()β protected virtual helper, no extra deets on the page.virtual void _append (const LoggingEvent &event)β sends aLoggingEventto NT Event log.
π Protected Member Functions inherited from log4cpp::AppenderSkeleton π
AppenderSkeleton (const std::string &name)β constructor forAppenderSkeleton.
π Protected Member Functions inherited from log4cpp::Appender π
Appender (const std::string &name)β constructor forAppender.
π Protected Attributes π
HANDLE _hEventSourcestd::string _strSourceName
β Additional Inherited Members β
π Static Public Member Functions inherited from log4cpp::Appender π
static Appender *getAppender (const std::string &name)β get a pointer to an exitsingAppender.static bool reopenAll ()β callreopen()on all existing Appenders.static void closeAll ()β callreopen()on all existing Appenders. (yes, the original saysreopen()here too β keeping it exactly as written. π«‘)
π₯ Detailed Description π₯
NTEventLogAppender is an Appender that sends LoggingEvents to the Windows event log. Iconic.
Building log4cpp.dsp/log4cppDLL.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.
π Constructor & Destructor Documentation π
π log4cpp::NTEventLogAppender::NTEventLogAppender (const std::string & name, const std::string & sourceName) π
Instantiate an NTEventLogAppender with given name and source.
- Parameters
nameβ the name of the AppendersourceNameβ the source name to log
π log4cpp::NTEventLogAppender::~NTEventLogAppender () [virtual] π
The virtual destructor. No extra description on the page.
π₯ Member Function Documentation π₯
π«Ά void log4cpp::NTEventLogAppender::_append (const LoggingEvent & event) [protected], [virtual] π«Ά
Sends a LoggingEvent to NT Event log.
- Parameters
eventβ theLoggingEventto log.
Implements log4cpp::AppenderSkeleton.
π§ void log4cpp::NTEventLogAppender::addRegistryInfo (const char * source) [protected] π§
Protected helper, no extra description on the page.
π¦ void log4cpp::NTEventLogAppender::close () [virtual] π¦
Release any resources allocated within the appender such as file handles, network connections, etc.
Implements log4cpp::AppenderSkeleton.
πΈ WORD log4cpp::NTEventLogAppender::getCategory (Priority::Value priority) [protected] πΈ
Convert log4cpp 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.
β WORD log4cpp::NTEventLogAppender::getType (Priority::Value priority) [protected] β
Convert log4cpp Priority to an EventLog type. The log4cpp package supports 8 defined priorites, but the NT EventLog only knows 3 event types of interest to us: ERROR, WARNING, and INFO.
π void log4cpp::NTEventLogAppender::open () [protected], [virtual] π
Protected virtual helper, no extra description on the page.
π HKEY log4cpp::NTEventLogAppender::regGetKey (TCHAR * subkey, DWORD * disposition) [protected] π
Protected helper, no extra description on the page.
π void log4cpp::NTEventLogAppender::regSetDword (HKEY hkey, TCHAR * name, DWORD value) [protected] π
Protected helper, no extra description on the page.
π void log4cpp::NTEventLogAppender::regSetString (HKEY hkey, TCHAR * name, TCHAR * value) [protected] π
Protected helper, no extra description on the page.
π bool log4cpp::NTEventLogAppender::reopen () [virtual] π
Calls open() and close().
Reimplemented from log4cpp::AppenderSkeleton.
π bool log4cpp::NTEventLogAppender::requiresLayout () const [virtual] π
The NTEventLogAppender does its own Layout.
- Returns
false
Implements log4cpp::AppenderSkeleton.
β¨ void log4cpp::NTEventLogAppender::setLayout (Layout * layout) [virtual] β¨
Set the Layout for this appender.
- Parameters
layoutβ the layout to use.
Implements log4cpp::AppenderSkeleton.
πΈ Member Data Documentation πΈ
HANDLE log4cpp::NTEventLogAppender::_hEventSource [protected]β protected member data.std::string log4cpp::NTEventLogAppender::_strSourceName [protected]β protected member data.
β Author β
Generated automatically by Doxygen for log4cpp from the source code.
This whole page is from log4cpp Version 1.1, and the footer says log4cpp::N...LogAppender(3) β that's the sign-off bestie, periodt. π«Άπ
π
π¦ 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