47std::unique_ptr<std::string> logFileName;
48std::unique_ptr<std::ofstream> logFile;
54 const char *msg,
const char *file,
int line)
56 report(severity, msg_type, msg, SC_MEDIUM, file, line);
61 const char *msg,
int verbosity,
const char *file,
78 if (msgInfo.
sevActions[severity] != SC_UNSPECIFIED)
80 else if (msgInfo.
actions != SC_UNSPECIFIED)
82 else if (sevInfo.
actions != SC_UNSPECIFIED)
85 actions &=
~sc_gem5::reportSuppressedActions;
94 current ? current->
name() :
nullptr, msgInfo.
id);
96 if (actions & SC_CACHE_REPORT) {
114 const char *file,
int line)
121 report(severity, msg_type.c_str(), msg, file, line);
162 int previous = info.
limit;
174 int previous = info.
limit;
181 const char *msg_type,
sc_severity severity,
int limit)
256 return force(SC_UNSPECIFIED);
285 if (actions & SC_DISPLAY)
288 if ((actions & SC_LOG) && logFile) {
290 sc_report_compose_message(
report));
292 if (actions & SC_STOP) {
296 if (actions & SC_INTERRUPT)
298 if (actions & SC_ABORT)
300 if (actions & SC_THROW) {
312 maxAction = maxAction << 1;
322 return ::sc_gem5::globalReportCache.get();
341 logFileName =
nullptr;
346 logFileName = std::unique_ptr<std::string>(
new std::string(new_name));
347 logFile = std::unique_ptr<std::ofstream>(
new std::ofstream(new_name));
358 return logFileName->c_str();
376 std::ostringstream str;
381 str << sevName <<
": ";
387 const char *msg = report.
get_msg();
411 logFileName =
nullptr;
const char * name() const
static sc_report * get_cached_report()
static sc_actions suppress()
static sc_actions set_actions(sc_severity, sc_actions=SC_UNSPECIFIED)
static int get_count(sc_severity)
static bool set_log_file_name(const char *)
static sc_actions get_new_action_id()
static sc_actions force()
static int set_verbosity_level(int)
static void default_handler(const sc_report &, const sc_actions &)
static sc_actions get_catch_actions()
static void report(sc_severity, const char *msg_type, const char *msg, const char *file, int line)
static const char * get_log_file_name()
static int stop_after(sc_severity, int limit=-1)
static sc_actions set_catch_actions(sc_actions)
static int get_verbosity_level()
static void set_handler(sc_report_handler_proc)
static void clear_cached_report()
const char * get_msg_type() const
const char * get_msg() const
int get_line_number() const
const char * get_process_name() const
const sc_time & get_time() const
sc_severity get_severity() const
const char * get_file_name() const
static sc_time from_value(sc_dt::uint64)
const std::string to_string() const
void lastReport(::sc_core::sc_report *report)
void cprintf(const char *format, const Args &...args)
void ccprintf(cp::Print &print)
bool sc_report_close_default_log()
void sc_interrupt_here(const char *msg_type, sc_severity)
const std::string sc_report_compose_message(const sc_report &)
void sc_stop_here(const char *msg_type, sc_severity)
const char SC_ID_UNKNOWN_ERROR_[]
sc_core::sc_report_handler_proc reportHandlerProc
sc_core::sc_actions reportSuppressedActions
std::map< std::string, ReportMsgInfo > & reportMsgInfoMap()
sc_core::sc_actions reportForcedActions
std::map< int, std::string > & reportIdToMsgMap()
std::unique_ptr< sc_core::sc_report > globalReportCache
bool reportWarningsAsErrors
ReportSevInfo reportSevInfos[sc_core::SC_MAX_SEVERITY]
const char * reportSeverityNames[]
sc_core::sc_actions reportCatchActions
const std::list< sc_core::sc_report_handler_proc > & getExtraSystemCReportHandlers()
sc_core::sc_actions actions
int sevCounts[sc_core::SC_MAX_SEVERITY]
int sevLimits[sc_core::SC_MAX_SEVERITY]
sc_core::sc_actions sevActions[sc_core::SC_MAX_SEVERITY]
void checkLimits(sc_core::sc_severity severity, sc_core::sc_actions &actions)
void checkLimit(sc_core::sc_actions &actions)
sc_core::sc_actions actions
const std::string & name()