DCMTK  Version 3.6.1 20121102
OFFIS DICOM Toolkit
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dcmtk::log4cplus::Appender Class Referenceabstract

Extend this class for implementing your own strategies for printing log statements. More...

+ Inheritance diagram for dcmtk::log4cplus::Appender:
+ Collaboration diagram for dcmtk::log4cplus::Appender:

Public Member Functions

 Appender (const helpers::Properties properties)
 
void destructorImpl ()
 
virtual void close ()=0
 Release any resources allocated within the appender such as file handles, network connections, etc. More...
 
void doAppend (const spi::InternalLoggingEvent &event)
 This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific append method.
 
virtual tstring getName ()
 Get the name of this appender. More...
 
virtual void setName (const tstring &name)
 Set the name of this appender. More...
 
virtual void setErrorHandler (OFauto_ptr< ErrorHandler > eh)
 Set the ErrorHandler for this Appender.
 
virtual ErrorHandlergetErrorHandler ()
 Return the currently set ErrorHandler for this Appender.
 
virtual void setLayout (OFauto_ptr< Layout > layout)
 Set the layout for this appender. More...
 
virtual LayoutgetLayout ()
 Returns the layout of this appender. More...
 
void setFilter (spi::FilterPtr f)
 Set the filter chain on this Appender.
 
spi::FilterPtr getFilter () const
 Get the filter chain on this Appender.
 
LogLevel getThreshold () const
 Returns this appenders threshold LogLevel. More...
 
void setThreshold (LogLevel th)
 Set the threshold LogLevel. More...
 
bool isAsSevereAsThreshold (LogLevel ll) const
 Check whether the message LogLevel is below the appender's threshold. More...
 
- Public Member Functions inherited from dcmtk::log4cplus::helpers::SharedObject
void addReference () const
 
void removeReference () const
 

Protected Member Functions

virtual void append (const spi::InternalLoggingEvent &event)=0
 Subclasses of Appender should implement this method to perform actual logging. More...
 
- Protected Member Functions inherited from dcmtk::log4cplus::helpers::SharedObject
 SharedObject (const SharedObject &)
 
SharedObjectoperator= (const SharedObject &)
 
- Protected Member Functions inherited from dcmtk::log4cplus::helpers::LogLogUser
 LogLogUser (const LogLogUser &)
 
LogLoggetLogLog () const
 
LogLogUseroperator= (const LogLogUser &rhs)
 

Protected Attributes

OFauto_ptr< Layoutlayout
 The layout variable does not need to be set if the appender implementation has its own layout. More...
 
tstring name
 Appenders are named. More...
 
LogLevel threshold
 There is no LogLevel threshold filtering by default. More...
 
spi::FilterPtr filter
 The first filter in the filter chain. More...
 
OFauto_ptr< ErrorHandlererrorHandler
 It is assumed and enforced that errorHandler is never null. More...
 
bool closed
 Is this appender closed?
 

Additional Inherited Members

- Public Attributes inherited from dcmtk::log4cplus::helpers::SharedObject
DCMTK_LOG4CPLUS_MUTEX_PTR_DECLARE access_mutex
 

Detailed Description

Extend this class for implementing your own strategies for printing log statements.

Member Function Documentation

virtual void dcmtk::log4cplus::Appender::append ( const spi::InternalLoggingEvent event)
protectedpure virtual

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

See Also
doAppend method.
virtual void dcmtk::log4cplus::Appender::close ( )
pure virtual

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.

virtual Layout* dcmtk::log4cplus::Appender::getLayout ( )
virtual

Returns the layout of this appender.

The value may be NULL.

This class owns the returned pointer.

virtual tstring dcmtk::log4cplus::Appender::getName ( )
virtual

Get the name of this appender.

The name uniquely identifies the appender.

LogLevel dcmtk::log4cplus::Appender::getThreshold ( ) const
inline

Returns this appenders threshold LogLevel.

See the setThreshold method for the meaning of this option.

bool dcmtk::log4cplus::Appender::isAsSevereAsThreshold ( LogLevel  ll) const
inline

Check whether the message LogLevel is below the appender's threshold.

If there is no threshold set, then the return value is always true.

virtual void dcmtk::log4cplus::Appender::setLayout ( OFauto_ptr< Layout layout)
virtual

Set the layout for this appender.

Note that some appenders have their own (fixed) layouts or do not use one. For example, the SocketAppender ignores the layout set here.

virtual void dcmtk::log4cplus::Appender::setName ( const tstring name)
virtual

Set the name of this appender.

The name is used by other components to identify this appender.

void dcmtk::log4cplus::Appender::setThreshold ( LogLevel  th)
inline

Set the threshold LogLevel.

All log events with lower LogLevel than the threshold LogLevel are ignored by the appender.

In configuration files this option is specified by setting the value of the Threshold option to a LogLevel string, such as "DEBUG", "INFO" and so on.

Member Data Documentation

OFauto_ptr<ErrorHandler> dcmtk::log4cplus::Appender::errorHandler
protected

It is assumed and enforced that errorHandler is never null.

spi::FilterPtr dcmtk::log4cplus::Appender::filter
protected

The first filter in the filter chain.

Set to null initially.

OFauto_ptr<Layout> dcmtk::log4cplus::Appender::layout
protected

The layout variable does not need to be set if the appender implementation has its own layout.

tstring dcmtk::log4cplus::Appender::name
protected

Appenders are named.

LogLevel dcmtk::log4cplus::Appender::threshold
protected

There is no LogLevel threshold filtering by default.


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


Generated on Wed Sep 4 2013 for DCMTK Version 3.6.1 20121102 by Doxygen 1.8.4