Public Member Functions | List of all members
ML::PatternSetter Class Reference

RAII based pattern setter for Logger class. More...

#include <logger.hpp>

Collaboration diagram for ML::PatternSetter:
Collaboration graph

Public Member Functions

 PatternSetter (const std::string &pattern="%v")
 Set the pattern for the rest of the log messages. More...
 
 ~PatternSetter ()
 This will restore the previous pattern that was active during the moment this object was created. More...
 

Detailed Description

RAII based pattern setter for Logger class.

{
PatternSetter _("%l -- %v");
CUML_LOG_INFO("Test message\n");
}
PatternSetter(const std::string &pattern="%v")
Set the pattern for the rest of the log messages.
Definition: logger.cpp:112
#define CUML_LOG_INFO(fmt,...)
Definition: logger.hpp:210

Constructor & Destructor Documentation

◆ PatternSetter()

ML::PatternSetter::PatternSetter ( const std::string &  pattern = "%v")

Set the pattern for the rest of the log messages.

Parameters
[in]patternpattern to be set

◆ ~PatternSetter()

ML::PatternSetter::~PatternSetter ( )

This will restore the previous pattern that was active during the moment this object was created.


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