When DPL dlog provider prints error message about unsupported log level, it must
explicitly cast LogLevel to int before printing it with %d.
This fixes KONA issue RQ170612-01344 reported by VD.
Change-Id: I31f298550d4ebe2888a82878489fa061b93c2995
try {
dlogMacros.at(level)(m_tag.get(), val.str().c_str());
} catch (const std::out_of_range &) {
- SLOG(LOG_ERROR, m_tag.get(), "Unsupported log level: %d", level);
+ SLOG(LOG_ERROR, m_tag.get(), "Unsupported log level: %d", static_cast<int>(level));
}
}