mCRL2
|
Class for logging messages. More...
#include <logger.h>
Public Member Functions | |
logger (const log_level_t l) | |
Default constructor. | |
~logger () | |
Destructor; flushes output. Flushing during destruction is important to confer thread safety to the logging mechanism. Requires that output performs output in an atomic way. | |
std::ostringstream & | get () |
Static Public Member Functions | |
static void | register_output_policy (output_policy &policy) |
Register output policy. | |
static void | unregister_output_policy (output_policy &policy) |
Unregister output policy. | |
static void | clear_output_policies () |
Clear all output policies. | |
static void | set_reporting_level (const log_level_t level) |
Set reporting level. | |
static log_level_t | get_reporting_level () |
Get reporting level. | |
static void | set_report_time_info () |
Indicate that timing information should be printed. | |
static void | clear_report_time_info () |
Indicate that timing information should not be printed. | |
static bool | get_report_time_info () |
Get whether timing information is printed. | |
Static Protected Member Functions | |
static std::atomic< log_level_t > & | log_level () |
static bool & | m_print_time_information () |
An indication whether time information should be printed. | |
static std::set< output_policy * > & | output_policies () |
Output policies. | |
Protected Attributes | |
std::ostringstream | m_os |
Stream that is printed to internally Collects the full debug message that we are currently printing. | |
log_level_t | m_level |
The loglevel of the current message. | |
time_t | m_timestamp |
Timestamp of the current message. | |
Additional Inherited Members | |
Private Member Functions inherited from mcrl2::utilities::noncopyable | |
noncopyable ()=default | |
noncopyable (const noncopyable &)=delete | |
noncopyable & | operator= (const noncopyable &)=delete |
Class for logging messages.
Based on a description in the article "Logging In C++", Petru Marginean Dr. Dobb's Journal, September 5, 2007 (url: http://drdobbs.com/cpp/201804215) Requires that OutputPolicy is a class which as a static member output(const std::string&)
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
protected |
|
protected |
|
protected |