scc  2024.06
SystemC components library
scc::LogConfig Struct Reference

the configuration class for the logging setup More...

#include <report.h>

Public Member Functions

LogConfiglogLevel (log)
 
LogConfigmsgTypeFieldWidth (unsigned)
 
LogConfigprintSysTime (bool=true)
 
LogConfigprintSimTime (bool=true)
 
LogConfigprintDelta (bool=true)
 
LogConfigprintSeverity (bool=true)
 
LogConfigcoloredOutput (bool=true)
 
LogConfiglogFileName (std::string &&)
 
LogConfiglogFileName (const std::string &)
 
LogConfiglogFilterRegex (std::string &&)
 
LogConfiglogFilterRegex (const std::string &)
 
LogConfiglogAsync (bool=true)
 
LogConfigdontCreateBroker (bool=true)
 
LogConfigreportOnlyFirstError (bool=true)
 
LogConfiginstanceBasedLogLevels (bool=true)
 
LogConfiginstallHandler (bool=true)
 

Public Attributes

log level {log::WARNING}
 
unsigned msg_type_field_width {24}
 
bool print_sys_time {false}
 
bool print_sim_time {true}
 
bool print_delta {false}
 
bool print_severity {true}
 
bool colored_output {true}
 
std::string log_file_name {""}
 
std::string log_filter_regex {""}
 
bool log_async {true}
 
bool dont_create_broker {false}
 
bool report_only_first_error {false}
 
bool instance_based_log_levels {true}
 
bool install_handler {true}
 

Detailed Description

the configuration class for the logging setup

using this class allows to configure the logging output in many aspects. The class follows the builder pattern.

Definition at line 162 of file report.h.

Member Function Documentation

◆ coloredOutput()

auto scc::LogConfig::coloredOutput ( bool  enable = true)

enable/disable colored output

Parameters
enable
Returns
self

Definition at line 505 of file report.cpp.

◆ dontCreateBroker()

auto scc::LogConfig::dontCreateBroker ( bool  v = true)

disable/enable the automatic creation of a CCI broker

Parameters
enable
Returns
self

Definition at line 525 of file report.cpp.

◆ installHandler()

auto scc::LogConfig::installHandler ( bool  v = true)

disable/enable the use of the tabular report handler

Parameters

Definition at line 538 of file report.cpp.

◆ instanceBasedLogLevels()

auto scc::LogConfig::instanceBasedLogLevels ( bool  v = true)

disable/enable the suppression of all error messages after the first error

Parameters

Definition at line 534 of file report.cpp.

◆ logAsync()

auto scc::LogConfig::logAsync ( bool  v = true)

enable/disable asynchronous output (write to file in separate thread

Parameters
enable
Returns
self

Definition at line 520 of file report.cpp.

◆ logFileName() [1/2]

LogConfig& scc::LogConfig::logFileName ( const std::string &  )

set the file name for the log output file

Parameters
name
Returns
self

◆ logFileName() [2/2]

LogConfig& scc::LogConfig::logFileName ( std::string &&  )

set the file name for the log output file

Parameters
nameof the log file to be generated
Returns
self

◆ logFilterRegex() [1/2]

LogConfig& scc::LogConfig::logFilterRegex ( const std::string &  )

set the regular expression to filter the output

Parameters
stringcontaining the regex
Returns
self

◆ logFilterRegex() [2/2]

LogConfig& scc::LogConfig::logFilterRegex ( std::string &&  )

set the file name for the log output file

Parameters
name
Returns
self

◆ logLevel()

auto scc::LogConfig::logLevel ( scc::log  level)

set the logging level

Parameters
loglevel
Returns
self

Definition at line 465 of file report.cpp.

◆ msgTypeFieldWidth()

auto scc::LogConfig::msgTypeFieldWidth ( unsigned  width)

define the width of the message field, 0 to disable, std::numeric_limits<unsigned>::max() for arbitrary width

Parameters
widthof the message field in the log
Returns
self

Definition at line 470 of file report.cpp.

◆ printDelta()

auto scc::LogConfig::printDelta ( bool  enable = true)

enable/disable printing delta cycles

Parameters
enable
Returns
self

Definition at line 485 of file report.cpp.

◆ printSeverity()

auto scc::LogConfig::printSeverity ( bool  enable = true)

enable/disable printing of severity level

Parameters
enable
Returns
self

Definition at line 490 of file report.cpp.

◆ printSimTime()

auto scc::LogConfig::printSimTime ( bool  enable = true)

enable/disable printing of simulation time

Parameters
enable
Returns
self

Definition at line 480 of file report.cpp.

◆ printSysTime()

auto scc::LogConfig::printSysTime ( bool  enable = true)

enable/disable printing of system time

Parameters
enable
Returns
self

Definition at line 475 of file report.cpp.

◆ reportOnlyFirstError()

auto scc::LogConfig::reportOnlyFirstError ( bool  v = true)

disable/enable the suppression of all error messages after the first error

Parameters

Definition at line 530 of file report.cpp.


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