#include <NTEventLogAppender.hh>
Inheritance diagram for log4cpp::NTEventLogAppender:
Public Methods | |
NTEventLogAppender (const std::string &name, const std::string &sourceName) | |
Instantiate an NTEventLogAppender with given name and source. More... | |
virtual | ~NTEventLogAppender () |
virtual bool | reopen () |
Calls open() and close(). More... | |
virtual void | close () |
Release any resources allocated within the appender such as file handles, network connections, etc. More... | |
virtual bool | requiresLayout () const |
The NTEventLogAppender does its own Layout. More... | |
virtual void | setLayout (Layout *layout) |
Set the Layout for this appender. More... | |
Protected Methods | |
WORD | getCategory (Priority::Value priority) |
Convert log4cpp Priority to an EventLog category. More... | |
WORD | getType (Priority::Value priority) |
Convert log4cpp Priority to an EventLog type. More... | |
HKEY | regGetKey (TCHAR *subkey, DWORD *disposition) |
void | regSetString (HKEY hkey, TCHAR *name, TCHAR *value) |
void | regSetDword (HKEY hkey, TCHAR *name, DWORD value) |
void | addRegistryInfo (const char *source) |
virtual void | open () |
virtual void | _append (const LoggingEvent &event) |
Sends a LoggingEvent to NT Event log. More... | |
Protected Attributes | |
HANDLE | _hEventSource |
std::string | _strSourceName |
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.
|
Instantiate an NTEventLogAppender with given name and source.
|
|
|
|
Sends a LoggingEvent to NT Event log.
Implements log4cpp::AppenderSkeleton. |
|
|
|
Release any resources allocated within the appender such as file handles, network connections, etc.
Implements log4cpp::AppenderSkeleton. |
|
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. |
|
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. |
|
|
|
|
|
|
|
|
|
Reimplemented from log4cpp::AppenderSkeleton. |
|
The NTEventLogAppender does its own Layout.
Implements log4cpp::AppenderSkeleton. |
|
Set the Layout for this appender.
Implements log4cpp::AppenderSkeleton. |
|
|
|
|