|
My Project
|
Abstract interface class for log backends. More...
#include <LogBackend.hpp>
Public Member Functions | |
| LogBackend (int64_t mask) | |
| Construct with given message mask. | |
| virtual | ~LogBackend () |
| Virtual destructor to enable inheritance. | |
| void | setMessageFormatter (std::shared_ptr< MessageFormatterInterface > formatter) |
| Configure how formatMessage() will modify message strings. | |
| void | setMessageLimiter (std::shared_ptr< MessageLimiter > limiter) |
| Configure how message tags will be used to limit messages. | |
| void | addMessage (int64_t messageFlag, const std::string &message) |
| Add a message to the backend if accepted by the message limiter. | |
| void | addTaggedMessage (int64_t messageFlag, const std::string &messageTag, const std::string &message) |
| Add a tagged message to the backend if accepted by the message limiter. | |
| int64_t | getMask () const |
| The message mask types are specified in the Opm::Log::MessageType namespace, in file LogUtils.hpp. | |
Protected Member Functions | |
| virtual void | addMessageUnconditionally (int64_t messageFlag, const std::string &message)=0 |
| This is the method subclasses should override. | |
| std::string | formatMessage (int64_t messageFlag, const std::string &message) |
| Return decorated version of message depending on configureDecoration() arguments. | |
Abstract interface class for log backends.
|
protectedpure virtual |
This is the method subclasses should override.
Typically a subclass may filter, change, and output messages based on configuration and the messageFlag.
Implemented in Opm::CounterLog, Opm::TimerLog, Opm::EclipsePRTLog, and Opm::StreamLog.