diff --git a/utils/src/dh_utils_hitrace.cpp b/utils/src/dh_utils_hitrace.cpp index 3bc80bb3abf387282008399b4a98757e3f873318..f3e50c6b47b41f9dc357b283754da54c3a0c944f 100644 --- a/utils/src/dh_utils_hitrace.cpp +++ b/utils/src/dh_utils_hitrace.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -20,7 +20,8 @@ namespace OHOS { namespace DistributedHardware { void DHCompMgrTraceStart(const std::string &anonyNetworkId, const std::string &anonyDHId, const std::string &msg) { - StartTrace(DHFWK_HITRACE_LABEL, anonyNetworkId + "_" + anonyDHId + "_" + msg); + std::string traceMsg = anonyNetworkId + "_" + anonyDHId + "_" + msg; + StartTraceEx(HiTraceOutputLevel::HITRACE_LEVEL_INFO, DHFWK_HITRACE_LABEL, traceMsg.c_str(), ""); } void DHQueryTraceStart(const DHType dhType) @@ -30,17 +31,18 @@ void DHQueryTraceStart(const DHType dhType) if (it != DHTypeStrMap.end()) { dhTypeStr = it->second; } - StartTrace(DHFWK_HITRACE_LABEL, dhTypeStr + "_" + DH_QUERY_START); + std::string traceMsg = dhTypeStr + "_" + DH_QUERY_START; + StartTraceEx(HiTraceOutputLevel::HITRACE_LEVEL_INFO, DHFWK_HITRACE_LABEL, traceMsg.c_str(), ""); } void DHTraceStart(const std::string &msg) { - StartTrace(DHFWK_HITRACE_LABEL, msg); + StartTraceEx(HiTraceOutputLevel::HITRACE_LEVEL_INFO, DHFWK_HITRACE_LABEL, msg.c_str(), ""); } void DHTraceEnd() { - FinishTrace(DHFWK_HITRACE_LABEL); + FinishTraceEx(HiTraceOutputLevel::HITRACE_LEVEL_INFO, DHFWK_HITRACE_LABEL); } } // namespace DistributedHardware } // namespace OHOS \ No newline at end of file