| 434 | // Log |
| 435 | template <class... Args> |
| 436 | inline void OpLog::Log(std::uint32_t level, fmt::format_string<Args...> fmt, Args&&... args) { |
| 437 | const auto& cur_lgr = ctx_.GetLogger(); |
| 438 | if (level >= cur_lgr.GetLogLevel()) { |
| 439 | std::string log_str = ::aimrt_fmt::format(fmt, std::forward<Args>(args)...); |
| 440 | cur_lgr.Log(level, loc_.line(), loc_.file_name(), __FUNCTION__, log_str.c_str(), log_str.size()); |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | inline OpLog Log(std::source_location loc = std::source_location::current()) { |
| 445 | return aimrt::context::details::GetCurrentContext(loc)->log(loc); |
nothing calls this directly
no test coverage detected