log4shib::NTEventLogAppender Class Reference
NTEventLogAppender is an Appender that sends LoggingEvents to the Windows event log.
More...
#include <NTEventLogAppender.hh>
List of all members.
Detailed Description
NTEventLogAppender is an Appender that sends LoggingEvents to the Windows event log.
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.
Constructor & Destructor Documentation
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 |
log4shib::NTEventLogAppender::~NTEventLogAppender |
( |
|
) |
[virtual] |
Member Function Documentation
void log4shib::NTEventLogAppender::_append |
( |
const LoggingEvent & |
event |
) |
[protected, virtual] |
void log4shib::NTEventLogAppender::addRegistryInfo |
( |
const char * |
source |
) |
[protected] |
void log4shib::NTEventLogAppender::close |
( |
|
) |
[virtual] |
Release any resources allocated within the appender such as file handles, network connections, etc.
Implements log4shib::AppenderSkeleton.
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.
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.
void log4shib::NTEventLogAppender::open |
( |
|
) |
[protected, virtual] |
HKEY log4shib::NTEventLogAppender::regGetKey |
( |
TCHAR * |
subkey, |
|
|
DWORD * |
disposition | |
|
) |
| | [protected] |
void log4shib::NTEventLogAppender::regSetDword |
( |
HKEY |
hkey, |
|
|
TCHAR * |
name, |
|
|
DWORD |
value | |
|
) |
| | [protected] |
void log4shib::NTEventLogAppender::regSetString |
( |
HKEY |
hkey, |
|
|
TCHAR * |
name, |
|
|
TCHAR * |
value | |
|
) |
| | [protected] |
bool log4shib::NTEventLogAppender::reopen |
( |
|
) |
[virtual] |
bool log4shib::NTEventLogAppender::requiresLayout |
( |
|
) |
const [virtual] |
void log4shib::NTEventLogAppender::setLayout |
( |
Layout * |
layout |
) |
[virtual] |
Member Data Documentation
The documentation for this class was generated from the following files: