MCPcopy Create free account
hub / github.com/AimRT/AimRT / Log

Method Log

src/interface/aimrt_module_cpp_interface/context/context.h:436–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434// Log
435template <class... Args>
436inline 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
444inline OpLog Log(std::source_location loc = std::source_location::current()) {
445 return aimrt::context::details::GetCurrentContext(loc)->log(loc);

Callers

nothing calls this directly

Calls 2

GetLoggerMethod · 0.45
GetLogLevelMethod · 0.45

Tested by

no test coverage detected