Apache log4cxx  Version 0.12.1
log4cxx::nt::NTEventLogAppender Class Reference

Appends log events to NT EventLog. More...

#include <nteventlogappender.h>

Inheritance diagram for log4cxx::nt::NTEventLogAppender:
log4cxx::AppenderSkeleton log4cxx::Appender log4cxx::helpers::Object log4cxx::spi::OptionHandler log4cxx::helpers::Object

Public Member Functions

 NTEventLogAppender ()
 NTEventLogAppender (const LogString &server, const LogString &log, const LogString &source, const LayoutPtr &layout)
virtual ~NTEventLogAppender ()
virtual void activateOptions (log4cxx::helpers::Pool &p)
 Derived appenders should override this method if option structure requires it. More...
virtual void close ()
 Release any resources allocated within the appender such as file handles, network connections, etc. More...
virtual void setOption (const LogString &option, const LogString &value)
 Set option to value. More...
bool requiresLayout () const
 The SocketAppender does not use a layout. More...
void setSource (const LogString &source)
const LogStringgetSource () const
void setLog (const LogString &log)
const LogStringgetLog () const
void setServer (const LogString &server)
const LogStringgetServer () const
- Public Member Functions inherited from log4cxx::AppenderSkeleton
 AppenderSkeleton ()
 AppenderSkeleton (const LayoutPtr &layout)
void finalize ()
 Finalize this appender by calling the derived class' close method. More...
void addFilter (const spi::FilterPtr &newFilter)
 Add a filter to end of the filter list. More...
void clearFilters ()
 Clear the filters chain. More...
const spi::ErrorHandlerPtrgetErrorHandler () const
 Return the currently set spi::ErrorHandler for this Appender. More...
spi::FilterPtr getFilter () const
 Returns the head Filter. More...
const spi::FilterPtrgetFirstFilter () const
 Return the first filter in the filter chain for this Appender. More...
LayoutPtr getLayout () const
 Returns the layout of this appender. More...
LogString getName () const
 Returns the name of this Appender. More...
const LevelPtrgetThreshold () const
 Returns this appenders threshold level. More...
bool isAsSevereAsThreshold (const LevelPtr &level) const
 Check whether the message level is below the appender's threshold. More...
virtual void doAppend (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool)
 This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific AppenderSkeleton::append method. More...
void setErrorHandler (const spi::ErrorHandlerPtr eh)
 Set the ErrorHandler for this Appender. More...
void setLayout (const LayoutPtr &layout1)
 Set the layout for this appender. More...
void setName (const LogString &name1)
 Set the name of this Appender. More...
void setThreshold (const LevelPtr &threshold)
 Set the threshold level. More...
- Public Member Functions inherited from log4cxx::Appender
virtual ~Appender ()
void asdf ()
- Public Member Functions inherited from log4cxx::spi::OptionHandler
virtual ~OptionHandler ()
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
virtual bool instanceof (const Class &clazz) const =0
virtual const void * cast (const Class &clazz) const =0

Protected Types

typedef void SID
typedef void * HANDLE

Protected Member Functions

virtual void append (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p)
 Subclasses of AppenderSkeleton should implement this method to perform actual logging. More...
void addRegistryInfo ()
- Protected Member Functions inherited from log4cxx::AppenderSkeleton
void doAppendImpl (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &pool)

Static Protected Member Functions

static unsigned short getEventType (const spi::LoggingEventPtr &event)
static unsigned short getEventCategory (const spi::LoggingEventPtr &event)
static LogString getErrorString (const LogString &function)

Protected Attributes

LogString server
LogString log
LogString source
HANDLE hEventLog
- Protected Attributes inherited from log4cxx::AppenderSkeleton
LayoutPtr layout
 The layout variable does not need to be set if the appender implementation has its own layout. More...
LogString name
 Appenders are named. More...
LevelPtr threshold
 There is no level threshold filtering by default. More...
spi::ErrorHandlerPtr errorHandler
 It is assumed and enforced that errorHandler is never null. More...
spi::FilterPtr headFilter
 The first filter in the filter chain. More...
spi::FilterPtr tailFilter
 The last filter in the filter chain. More...
bool closed
 Is this appender closed? More...
log4cxx::helpers::Pool pool
log4cxx::shared_mutex mutex

Detailed Description

Appends log events to NT EventLog.

Member Typedef Documentation


typedef void* log4cxx::nt::NTEventLogAppender::HANDLE


typedef void log4cxx::nt::NTEventLogAppender::SID

Constructor & Destructor Documentation

◆ NTEventLogAppender() [1/2]

log4cxx::nt::NTEventLogAppender::NTEventLogAppender ( )

◆ NTEventLogAppender() [2/2]

log4cxx::nt::NTEventLogAppender::NTEventLogAppender ( const LogString server,
const LogString log,
const LogString source,
const LayoutPtr layout 

◆ ~NTEventLogAppender()

virtual log4cxx::nt::NTEventLogAppender::~NTEventLogAppender ( )

Member Function Documentation

◆ activateOptions()

virtual void log4cxx::nt::NTEventLogAppender::activateOptions ( log4cxx::helpers::Pool )

Derived appenders should override this method if option structure requires it.

Reimplemented from log4cxx::AppenderSkeleton.

◆ addRegistryInfo()

void log4cxx::nt::NTEventLogAppender::addRegistryInfo ( )

◆ append()

virtual void log4cxx::nt::NTEventLogAppender::append ( const spi::LoggingEventPtr event,
log4cxx::helpers::Pool p 

Subclasses of AppenderSkeleton should implement this method to perform actual logging.

See also AppenderSkeleton::doAppend method.

Implements log4cxx::AppenderSkeleton.

◆ close()

virtual void log4cxx::nt::NTEventLogAppender::close ( )

Release any resources allocated within the appender such as file handles, network connections, etc.

It is a programming error to append to a closed appender.

Implements log4cxx::Appender.

◆ getErrorString()

static LogString log4cxx::nt::NTEventLogAppender::getErrorString ( const LogString function)

◆ getEventCategory()

static unsigned short log4cxx::nt::NTEventLogAppender::getEventCategory ( const spi::LoggingEventPtr event)

◆ getEventType()

static unsigned short log4cxx::nt::NTEventLogAppender::getEventType ( const spi::LoggingEventPtr event)

◆ getLog()

const LogString& log4cxx::nt::NTEventLogAppender::getLog ( ) const

◆ getServer()

const LogString& log4cxx::nt::NTEventLogAppender::getServer ( ) const

◆ getSource()

const LogString& log4cxx::nt::NTEventLogAppender::getSource ( ) const

◆ requiresLayout()

bool log4cxx::nt::NTEventLogAppender::requiresLayout ( ) const

The SocketAppender does not use a layout.

Hence, this method returns false.

Implements log4cxx::Appender.

◆ setLog()

void log4cxx::nt::NTEventLogAppender::setLog ( const LogString log)

◆ setOption()

virtual void log4cxx::nt::NTEventLogAppender::setOption ( const LogString option,
const LogString value 

Set option to value.

The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions is called.

Reimplemented from log4cxx::AppenderSkeleton.

◆ setServer()

void log4cxx::nt::NTEventLogAppender::setServer ( const LogString server)

◆ setSource()

void log4cxx::nt::NTEventLogAppender::setSource ( const LogString source)

Member Data Documentation

◆ hEventLog

HANDLE log4cxx::nt::NTEventLogAppender::hEventLog

◆ log

LogString log4cxx::nt::NTEventLogAppender::log

◆ pCurrentUserSID

SID* log4cxx::nt::NTEventLogAppender::pCurrentUserSID

◆ server

LogString log4cxx::nt::NTEventLogAppender::server

◆ source

LogString log4cxx::nt::NTEventLogAppender::source

The documentation for this class was generated from the following file: