mCRL2
Loading...
Searching...
No Matches
mcrl2::log::output_policy Class Referenceabstract

Interface class for output policy. More...

#include <logger.h>

Inheritance diagram for mcrl2::log::output_policy:
mcrl2::gui::qt::LogRelay mcrl2::log::file_output

Public Member Functions

 output_policy ()=default
 Constructor.
 
virtual ~output_policy ()=default
 Destructor.
 
virtual void output (log_level_t level, time_t timestamp, const std::string &msg, bool print_time_information)=0
 Output message.
 

Detailed Description

Interface class for output policy.

Separates the exact way of doing output from the logger class.

Definition at line 101 of file logger.h.

Constructor & Destructor Documentation

◆ output_policy()

mcrl2::log::output_policy::output_policy ( )
default

Constructor.

◆ ~output_policy()

virtual mcrl2::log::output_policy::~output_policy ( )
virtualdefault

Destructor.

Member Function Documentation

◆ output()

virtual void mcrl2::log::output_policy::output ( log_level_t  level,
time_t  timestamp,
const std::string &  msg,
bool  print_time_information 
)
pure virtual

Output message.

Parameters
[in]msgMessage that is written to output.
[in]timestampTimestamp to use in the output.
[in]levelThe log level to print the message to.
[in]print_time_informationAn indication whether the time must be printed.

Any implementation must assure that output is written using an atomic action, to prevent mixing of different lines into one line in the output.

Implemented in mcrl2::log::file_output, and mcrl2::gui::qt::LogRelay.


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