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

Method SetModuleLogLevel

src/plugins/log_control_plugin/service.cc:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42aimrt::co::Task<aimrt::rpc::Status> LogControlServiceImpl::SetModuleLogLevel(
43 aimrt::rpc::ContextRef ctx_ref,
44 const ::aimrt::protocols::log_control_plugin::SetModuleLogLevelReq& req,
45 ::aimrt::protocols::log_control_plugin::SetModuleLogLevelRsp& rsp) {
46 std::unordered_map<std::string, aimrt_log_level_t> log_lvl_settings;
47
48 for (const auto& itr : req.module_log_level_map()) {
49 log_lvl_settings.emplace(
50 itr.first,
51 aimrt::runtime::core::logger::LogLevelTool::GetLogLevelFromName(itr.second));
52 }
53
54 logger_manager_ptr_->SetLoggerLevels(log_lvl_settings);
55
56 co_return aimrt::rpc::Status();
57}
58
59} // namespace aimrt::plugins::log_control_plugin

Callers

nothing calls this directly

Calls 2

StatusClass · 0.85
SetLoggerLevelsMethod · 0.80

Tested by

no test coverage detected