Include file:
#include "mcrl2/utilities/logger.h
mcrl2::log::
logger
¶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&)
mcrl2::log::logger::
m_level
¶The loglevel of the current message.
hint_to_level
()¶Mapping of message hint to loglevel. This allows a finegrained control of log messages to log levels. It can e.g. be set that for some message hint all messages up to debug level are printed, whereas for other message hints no messages are printed at all.
m_print_time_information
()¶An indication whether time information should be printed.
output_policies
()¶Output policies.
clear_output_policies
()¶Clear all output policies.
clear_report_time_info
()¶Indicate that timing information should not be printed.
clear_reporting_level
(const std::string &hint)¶Clear reporting level.
Parameters:
default_hint
()¶Default hint (empty)
default_reporting_level
()¶The default log level that is used if no specific log level has been set.
get_report_time_info
()¶Get whether timing information is printed.
Returns: True if time information is printed, otherwise false.
get_reporting_level
(const std::string &hint = default_hint())¶Get reporting level.
Parameters:
register_output_policy
(output_policy &policy)¶Register output policy.
set_report_time_info
()¶Indicate that timing information should be printed.
set_reporting_level
(const log_level_t level, const std::string &hint = default_hint())¶Set reporting level.
Parameters:
unregister_output_policy
(output_policy &policy)¶Unregister output policy.
get
(const log_level_t l, const std::string &hint = default_hint())¶Get access to the stream provided by the logger.
Parameters:
logger
()¶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.