- 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_warnings.count(message))
- {
- log("%s", message.c_str());
- log_flush();
- }
- else
- {
- if (log_errfile != NULL && !log_quiet_warnings)
- log_files.push_back(log_errfile);
-
- log("%s", message.c_str());
- log_flush();