scc 2025.09
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 163 of file report.h.

Member Function Documentation

◆ coloredOutput()

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

enable/disable colored output

Parameters
enable
Returns
self

Definition at line 568 of file report.cpp.

◆ dontCreateBroker()

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

disable/enable the automatic creation of a CCI broker

Parameters
enable
Returns
self

Definition at line 588 of file report.cpp.

◆ installHandler()

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

disable/enable the use of the tabular report handler

Parameters

return self

Definition at line 601 of file report.cpp.

◆ instanceBasedLogLevels()

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

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

Parameters

return self

Definition at line 597 of file report.cpp.

◆ logAsync()

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

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

Parameters
enable
Returns
self

Definition at line 583 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 ( log )

set the logging level

Parameters
loglevel
Returns
self

Definition at line 528 of file report.cpp.

◆ msgTypeFieldWidth()

auto scc::LogConfig::msgTypeFieldWidth ( unsigned )

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 533 of file report.cpp.

◆ printDelta()

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

enable/disable printing delta cycles

Parameters
enable
Returns
self

Definition at line 548 of file report.cpp.

◆ printSeverity()

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

enable/disable printing of severity level

Parameters
enable
Returns
self

Definition at line 553 of file report.cpp.

◆ printSimTime()

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

enable/disable printing of simulation time

Parameters
enable
Returns
self

Definition at line 543 of file report.cpp.

◆ printSysTime()

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

enable/disable printing of system time

Parameters
enable
Returns
self

Definition at line 538 of file report.cpp.

◆ reportOnlyFirstError()

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

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

Parameters

return self

Definition at line 593 of file report.cpp.

Member Data Documentation

◆ colored_output

bool scc::LogConfig::colored_output {true}

Definition at line 170 of file report.h.

◆ dont_create_broker

bool scc::LogConfig::dont_create_broker {false}

Definition at line 174 of file report.h.

◆ install_handler

bool scc::LogConfig::install_handler {true}

Definition at line 177 of file report.h.

◆ instance_based_log_levels

bool scc::LogConfig::instance_based_log_levels {true}

Definition at line 176 of file report.h.

◆ level

log scc::LogConfig::level {log::WARNING}

Definition at line 164 of file report.h.

◆ log_async

bool scc::LogConfig::log_async {true}

Definition at line 173 of file report.h.

◆ log_file_name

std::string scc::LogConfig::log_file_name {""}

Definition at line 171 of file report.h.

◆ log_filter_regex

std::string scc::LogConfig::log_filter_regex {""}

Definition at line 172 of file report.h.

◆ msg_type_field_width

unsigned scc::LogConfig::msg_type_field_width {24}

Definition at line 165 of file report.h.

◆ print_delta

bool scc::LogConfig::print_delta {false}

Definition at line 168 of file report.h.

◆ print_severity

bool scc::LogConfig::print_severity {true}

Definition at line 169 of file report.h.

◆ print_sim_time

bool scc::LogConfig::print_sim_time {true}

Definition at line 167 of file report.h.

◆ print_sys_time

bool scc::LogConfig::print_sys_time {false}

Definition at line 166 of file report.h.

◆ report_only_first_error

bool scc::LogConfig::report_only_first_error {false}

Definition at line 175 of file report.h.


The documentation for this struct was generated from the following files:
  • /home/eyck/Projects/MINRES/SystemC-Components/src/sysc/scc/report.h
  • /home/eyck/Projects/MINRES/SystemC-Components/src/sysc/scc/report.cpp