From 1d5f7958f3cb00e8a2b3278ff9f6189cca65a932 Mon Sep 17 00:00:00 2001 From: "liyihan2@huawei.com" Date: Mon, 8 Mar 2021 20:18:50 +0800 Subject: [PATCH] log optimize --- ge/analyzer/analyzer.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ge/analyzer/analyzer.cc b/ge/analyzer/analyzer.cc index 81cd762f..60d32fd4 100755 --- a/ge/analyzer/analyzer.cc +++ b/ge/analyzer/analyzer.cc @@ -155,12 +155,12 @@ std::shared_ptr Analyzer::GetJsonObject(uint64_t session_id, uint64_t std::lock_guard lg(mutex_); auto iter = graph_infos_.find(session_id); if (iter == graph_infos_.end()) { - GELOGE(PARAM_INVALID, "[Check][Session_id]session_id:%lu does not exist!", session_id); + GELOGE(PARAM_INVALID, "[Check][Session_id]session_id:%lu does not exist! graph_id:%lu", session_id, graph_id); return nullptr; } else { auto iter1 = (iter->second).find(graph_id); if (iter1 == (iter->second).end()) { - GELOGE(PARAM_INVALID, "[Check][Graph_id]graph_id:%lu does not exist!", graph_id); + GELOGE(PARAM_INVALID, "[Check][Graph_id]graph_id:%lu does not exist!session_id:%lu", graph_id, session_id); return nullptr; } GELOGI("GetJsonObject Success!session_id:%lu graph_id:%lu", session_id, graph_id); @@ -221,7 +221,7 @@ ge::Status Analyzer::SaveAnalyzerDataToFile(uint64_t session_id, uint64_t graph_ try { json_file_ << jsn.dump(kJsonDumpLevel) << std::endl; } catch (nlohmann::detail::type_error &e) { - GELOGE(FAILED, "[FindReason][AnalyzerFile]analyzer file [%s] failed because [%s]", json_file_name_.c_str(), e.what()); + GELOGE(FAILED, "[Json.dump][GraphInfo]json.dump to file [%s] failed because [%s],session_id [%lu], graph_id [%lu]", json_file_name_.c_str(), e.what(), session_id, graph_id); ret_failed = true; } json_file_.close(); @@ -241,7 +241,7 @@ ge::Status Analyzer::DoAnalyze(DataInfo &data_info) { GE_CHECK_NOTNULL(graph_info); auto status = SaveOpInfo(desc, data_info, graph_info); if (status != SUCCESS) { - GELOGE(status, "[Check][SaveOpInfo]save op info:pnode:%s desc:%s graph_info:%s failed!", pnode.cstr(), desc.cstr(), graph_info.cstr()); + GELOGE(status, "[Check][SaveOpInfo]save op info:desc_name [%s] desc_type [%s] failed!", desc->GetName().c_str(), desc->GetType().c_str()); return FAILED; } // create json file