Opm::SimpleMessageFormatter Class Reference

A simple formatter capable of adding message prefixes and colors. More...

#include <MessageFormatter.hpp>

Inheritance diagram for Opm::SimpleMessageFormatter:
Inheritance graph

Public Member Functions

 SimpleMessageFormatter (const bool use_prefix, const bool use_color_coding)
 Constructor controlling formatting to be applied. More...
 
 SimpleMessageFormatter (const int64_t prefix_flag, const bool use_color_coding)
 
 SimpleMessageFormatter (const bool use_color_coding)
 
virtual std::string format (const int64_t message_flag, const std::string &message) override
 

Detailed Description

A simple formatter capable of adding message prefixes and colors.

Constructor & Destructor Documentation

◆ SimpleMessageFormatter() [1/3]

Opm::SimpleMessageFormatter::SimpleMessageFormatter ( const bool  use_prefix,
const bool  use_color_coding 
)
inline

Constructor controlling formatting to be applied.

References Opm::Log::DefaultMessageTypes.

◆ SimpleMessageFormatter() [2/3]

Opm::SimpleMessageFormatter::SimpleMessageFormatter ( const int64_t  prefix_flag,
const bool  use_color_coding 
)
inline

◆ SimpleMessageFormatter() [3/3]

Opm::SimpleMessageFormatter::SimpleMessageFormatter ( const bool  use_color_coding)
inlineexplicit

Member Function Documentation

◆ format()

virtual std::string Opm::SimpleMessageFormatter::format ( const int64_t  message_flag,
const std::string message 
)
inlineoverridevirtual

Returns a copy of the input string with a flag-dependant prefix (if use_prefix) and the entire message in a flag-dependent color (if use_color_coding).

Implements Opm::MessageFormatterInterface.

References Opm::Log::colorCodeMessage(), Opm::Log::prefixMessage(), and string.


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