Hide menu
No Matches
cadex::Base_LoggerAsyncAppender Class Reference

Provides asynchronous message logging. More...

#include <cadex/Base_LoggerAsyncAppender.hxx>

Inheritance diagram for cadex::Base_LoggerAsyncAppender:

Public Member Functions

 Base_LoggerAsyncAppender ()
 ~Base_LoggerAsyncAppender ()
void Register (Base_LoggerAppender &theAppender, const Base_Logger::Level theMinLevel=Base_Logger::Trace, const Base_Logger::Level theMaxLevel=Base_Logger::Fatal)
 Adds an appender.
void Unregister (const Base_LoggerAppender &theAppender)
 Removes an appender.
- Public Member Functions inherited from cadex::Base_LoggerAppender
virtual ~Base_LoggerAppender ()
Base_LoggerAppenderoperator= (const Base_LoggerAppender &theAppender)
 Assignment operator.
virtual void Append (CharPointerType theMessage)=0
 Appends a message.
const std::shared_ptr< internal::Base_LoggerAppenderImpl > & Impl () const
 Returns internal implementation object.

Additional Inherited Members

- Public Types inherited from cadex::Base_LoggerAppender
typedef UTF16 CharType
 Defines a character type of user-visible strings.
typedef const UTF16CharPointerType
 Defines a type of the pointer to the character type.
- Protected Member Functions inherited from cadex::Base_LoggerAppender
 Base_LoggerAppender ()
 Base_LoggerAppender (const std::shared_ptr< internal::Base_LoggerAppenderImpl > &theImpl)
 Base_LoggerAppender (const Base_LoggerAppender &theAppender)
void Construct (const std::shared_ptr< internal::Base_LoggerAppenderImpl > &theImpl)
 Delayed constructor.
Base_LoggerAppenderThis ()
 Returns a pointer to this object.

Detailed Description

Provides asynchronous message logging.

The asynchronous appender servers as a proxy object for the logger and is useful when a particular appender takes considerable time to process a message.

The asynchronous appender maintains a list of other registered appenders and forwards them a message in a separate thread.

The message is delivered to the appenders in the order they were registered in the asynchronous appender.

See also

Member Function Documentation

◆ Register()

void cadex::Base_LoggerAsyncAppender::Register ( Base_LoggerAppender theAppender,
const Base_Logger::Level  theMinLevel = Base_Logger::Trace,
const Base_Logger::Level  theMaxLevel = Base_Logger::Fatal 

Adds an appender.

The life span of theAppender must be greater than on of this object, otherwise it must be explicitly unregistered with Unregister().