Browse Source

Extended signature of init_logging

pull/3/head
Eyck Jentzsch 1 year ago
parent
commit
1d169dafc8
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      incl/scc/report.h
  2. +2
    -1
      src/report.cpp

+ 1
- 1
incl/scc/report.h View File

@@ -34,7 +34,7 @@ namespace scc {
*
* @param level the logging level
*/
void init_logging(logging::log_level level = logging::WARNING);
void init_logging(logging::log_level level = logging::WARNING, bool print_time = false);
/**
* the logger class
*/


+ 2
- 1
src/report.cpp View File

@@ -96,7 +96,7 @@ void report_handler(const sc_report &rep, const sc_actions &actions) {
}
}

void scc::init_logging(logging::log_level level) {
void scc::init_logging(logging::log_level level, bool print_time) {
const std::array<int, 8> verbosity = {SC_NONE, // Logging::NONE
SC_LOW, // Logging::FATAL
SC_LOW, // Logging::ERROR
@@ -106,6 +106,7 @@ void scc::init_logging(logging::log_level level) {
SC_FULL, // logging::TRACE
SC_DEBUG}; // logging::TRACE+1
LOGGER(SystemC)::reporting_level() = level;
LOGGER(SystemC)::print_time() = print_time;
sc_report_handler::set_verbosity_level(verbosity[level]);
sc_report_handler::set_handler(report_handler);
}

Loading…
Cancel
Save