FIX: add some useful log for user

jira: [STUDIO-11053]
Change-Id: Iec616331776de8f95d40e46d60c81f3b31a981b4
This commit is contained in:
xin.zhang 2025-03-24 11:44:51 +08:00 committed by lane.wei
parent d097af3fb8
commit c4edf3ae28
1 changed files with 6 additions and 1 deletions

View File

@ -3110,7 +3110,12 @@ int MachineObject::publish_json(std::string json_str, int qos, int flag)
rtn = cloud_publish_json(json_str, qos, flag);
}
BOOST_LOG_TRIVIAL(trace) << "publish_json: " << json_str << " code: " << rtn;
if (rtn == 0) {
BOOST_LOG_TRIVIAL(info) << "publish_json: " << json_str << " code: " << rtn;
} else {
BOOST_LOG_TRIVIAL(error) << "publish_json: " << json_str << " code: " << rtn;
}
return rtn;
}