Browse Source

Extended signature of init_logging

Eyck Jentzsch 11 months 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 {
34 34
  *
35 35
  * @param level the logging level
36 36
  */
37
-void init_logging(logging::log_level level = logging::WARNING);
37
+void init_logging(logging::log_level level = logging::WARNING, bool print_time = false);
38 38
 /**
39 39
  * the logger class
40 40
  */

+ 2
- 1
src/report.cpp View File

@@ -96,7 +96,7 @@ void report_handler(const sc_report &rep, const sc_actions &actions) {
96 96
 }
97 97
 }
98 98
 
99
-void scc::init_logging(logging::log_level level) {
99
+void scc::init_logging(logging::log_level level, bool print_time) {
100 100
     const std::array<int, 8> verbosity = {SC_NONE,   // Logging::NONE
101 101
                                           SC_LOW,    // Logging::FATAL
102 102
                                           SC_LOW,    // Logging::ERROR
@@ -106,6 +106,7 @@ void scc::init_logging(logging::log_level level) {
106 106
                                           SC_FULL,   // logging::TRACE
107 107
                                           SC_DEBUG}; // logging::TRACE+1
108 108
     LOGGER(SystemC)::reporting_level() = level;
109
+    LOGGER(SystemC)::print_time() = print_time;
109 110
     sc_report_handler::set_verbosity_level(verbosity[level]);
110 111
     sc_report_handler::set_handler(report_handler);
111 112
 }