LOG4CPP::NTEVENTLOGAPPENDER(3)

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

πŸŽ€ 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 an NTEventLogAppender with the given name and source.
  • virtual ~NTEventLogAppender () β€” the virtual destructor.
  • virtual bool reopen () β€” calls open() and close().
  • virtual void close () β€” release any resources allocated within the appender such as file handles, network connections, etc.
  • virtual bool requiresLayout () const β€” the NTEventLogAppender does its own Layout.
  • virtual void setLayout (Layout *layout) β€” 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 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.

🫢 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 a LoggingEvent to NT Event log.

🌈 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 πŸ‘‘

  • HANDLE _hEventSource
  • std::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 exitsing Appender.
  • static bool reopenAll () β€” call reopen() on all existing Appenders.
  • static void closeAll () β€” call reopen() on all existing Appenders. (yes, the original says reopen() 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 Appender
    • sourceName β€” 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 β€” the LoggingEvent to 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