olp-cpp-sdk  1.22.0
Public Member Functions | List of all members
olp::logging::ConsoleAppender Class Reference

An appender that prints messages to the console. More...

#include <ConsoleAppender.h>

Inheritance diagram for olp::logging::ConsoleAppender:
Inheritance graph
[legend]
Collaboration diagram for olp::logging::ConsoleAppender:
Collaboration graph
[legend]

Public Member Functions

 ConsoleAppender (MessageFormatter formatter=MessageFormatter::createDefault())
 Creates a ConsoleAppender instance with a message formatter. More...
 
const MessageFormattergetMessageFormatter () const
 Gets the message formatter. More...
 
ConsoleAppendersetMessageFormatter (MessageFormatter formatter)
 Sets the message formatter. More...
 
IAppenderappend (const LogMessage &message) override
 Appends the message using char strings. More...
 

Detailed Description

An appender that prints messages to the console.

Constructor & Destructor Documentation

◆ ConsoleAppender()

olp::logging::ConsoleAppender::ConsoleAppender ( MessageFormatter  formatter = MessageFormatter::createDefault())
inlineexplicit

Creates a ConsoleAppender instance with a message formatter.

Parameters
formatterThe message formatter.

Member Function Documentation

◆ append()

IAppender& olp::logging::ConsoleAppender::append ( const LogMessage message)
overridevirtual

Appends the message using char strings.

Parameters
messageThe message to append.

Implements olp::logging::IAppender.

◆ getMessageFormatter()

const MessageFormatter & olp::logging::ConsoleAppender::getMessageFormatter ( ) const
inline

Gets the message formatter.

Returns
The message formatter.

◆ setMessageFormatter()

ConsoleAppender & olp::logging::ConsoleAppender::setMessageFormatter ( MessageFormatter  formatter)
inline

Sets the message formatter.

Parameters
formatterThe message formatter.

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