message += vstringf(msg, args);
if (msg_type == VERIFIC_ERROR || msg_type == VERIFIC_WARNING || msg_type == VERIFIC_PROGRAM_ERROR)
- log_warning("%s\n", message.c_str());
+ log_warning_noprefix("%s\n", message.c_str());
else
log("%s\n", message.c_str());
}
}
}
+void logv_warning_noprefix(const char *format, va_list ap)
+{
+ std::string message = vstringf(format, ap);
+ bool suppressed = false;
+
+ for (auto &re : log_nowarn_regexes)
+ if (std::regex_search(message, re))
+ suppressed = true;
+
+ if (suppressed)
+ {
+ log("%s", message.c_str());
+ }
+ else
+ {
+ if (log_errfile != NULL && !log_quiet_warnings)
+ log_files.push_back(log_errfile);
+
+ log("%s", message.c_str());
+ log_flush();
+
+ if (log_errfile != NULL && !log_quiet_warnings)
+ log_files.pop_back();
+ }
+}
+
void logv_error(const char *format, va_list ap)
{
#ifdef EMSCRIPTEN
va_end(ap);
}
+void log_warning_noprefix(const char *format, ...)
+{
+ va_list ap;
+ va_start(ap, format);
+ logv_warning_noprefix(format, ap);
+ va_end(ap);
+}
+
void log_error(const char *format, ...)
{
va_list ap;
void logv(const char *format, va_list ap);
void logv_header(RTLIL::Design *design, const char *format, va_list ap);
void logv_warning(const char *format, va_list ap);
+void logv_warning_noprefix(const char *format, va_list ap);
YS_NORETURN void logv_error(const char *format, va_list ap) YS_ATTRIBUTE(noreturn);
void log(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
void log_header(RTLIL::Design *design, const char *format, ...) YS_ATTRIBUTE(format(printf, 2, 3));
void log_warning(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
+void log_warning_noprefix(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2));
YS_NORETURN void log_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2), noreturn);
YS_NORETURN void log_cmd_error(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2), noreturn);