Lines Matching defs:log
58 std::string fmtLabel = GetFmtLabel(logContent.log);
59 std::pair<std::string, std::string> splitLogPair = SplitLogByFmtLabel(logContent.log, fmtLabel);
61 PrintLog(subModuleTag, logContent.BuildWithFmtAndArgs(PUBLIC_FMT_LABEL, splitLogPair.first)); // log前缀不做打印控制
63 PrintLog(subModuleTag, logContent.BuildWithFmtAndArgs(PUBLIC_FMT_LABEL, splitLogPair.second)); // log后缀不做打印控制
80 std::string fmtLabel = GetFmtLabel(logContent.log);
83 LONG_PRINT_HILOG(LOG_DEBUG, subModuleTag, logContent.log,
87 LONG_PRINT_HILOG(LOG_INFO, subModuleTag, logContent.log,
91 LONG_PRINT_HILOG(LOG_ERROR, subModuleTag, logContent.log,
99 std::pair<std::string, std::string> UpdateLog::SplitLogByFmtLabel(const std::string &log, const std::string &fmtLabel)
102 // 如果log中没有%{public|private}s,则把log全部内容作为前缀字符串,后缀字符串为空
103 return std::make_pair(log, "");
105 return std::make_pair(log.substr(0, log.find(fmtLabel, 0)), log.substr(log.find(fmtLabel, 0) +
109 std::string UpdateLog::GetFmtLabel(const std::string &log)
111 if (FindSubStrCount(log, DEFAULT_LABEL) != COUNT_ONE) {
112 // 如果log中%字符出现次数不为一个,说明log格式有误,返回空的fmtLabel
115 if (FindSubStrCount(log, DEFAULT_FMT_LABEL) == COUNT_ONE) {
118 if (FindSubStrCount(log, PRIVATE_FMT_LABEL) == COUNT_ONE) {
121 if (FindSubStrCount(log, PUBLIC_FMT_LABEL) == COUNT_ONE) {