日志整改

Signed-off-by: shihaojie6128 <shihaojie10@huawei.com>
This commit is contained in:
shihaojie6128 2024-06-24 16:14:38 +08:00
parent c0042c2007
commit a30f9dd189
7 changed files with 19 additions and 19 deletions

View File

@ -59,7 +59,7 @@ bool BundleManagerInternal::GetCallerAppIdFromBms(const std::string& bundleName,
return false;
}
appId = bundleMgr->GetAppIdByBundleName(bundleName, activeAccountId);
HILOGD("appId:%s", appId.c_str());
HILOGD("appId:%s", GetAnonymStr(appId).c_str());
return true;
}
@ -170,16 +170,16 @@ bool BundleManagerInternal::IsSameAppId(const std::string& callerAppId, const st
{
if (targetBundleName.empty() || callerAppId.empty()) {
HILOGE("targetBundleName:%{public}s or callerAppId:%s is empty",
targetBundleName.c_str(), callerAppId.c_str());
targetBundleName.c_str(), GetAnonymStr(callerAppId).c_str());
return false;
}
HILOGD("callerAppId:%s", callerAppId.c_str());
HILOGD("callerAppId:%s", GetAnonymStr(callerAppId).c_str());
std::string calleeAppId;
if (!GetCallerAppIdFromBms(targetBundleName, calleeAppId)) {
HILOGE("GetCallerAppIdFromBms failed");
return false;
}
HILOGD("calleeAppId:%s", calleeAppId.c_str());
HILOGD("calleeAppId:%s", GetAnonymStr(calleeAppId).c_str());
return callerAppId == calleeAppId;
}

View File

@ -1214,9 +1214,9 @@ bool DSchedContinue::CheckDeviceIdFromRemote(const std::string& localDevId, cons
HILOGE("destDevId is not same with localDevId");
return false;
}
HILOGD("CheckDeviceIdFromRemote srcDevId %{public}s", srcDevId.c_str());
HILOGD("CheckDeviceIdFromRemote localDevId %{public}s", localDevId.c_str());
HILOGD("CheckDeviceIdFromRemote destDevId %{public}s", destDevId.c_str());
HILOGD("CheckDeviceIdFromRemote srcDevId %{public}s", GetAnonymStr(srcDevId).c_str());
HILOGD("CheckDeviceIdFromRemote localDevId %{public}s", GetAnonymStr(localDevId).c_str());
HILOGD("CheckDeviceIdFromRemote destDevId %{public}s", GetAnonymStr(destDevId).c_str());
if (srcDevId == destDevId || srcDevId == localDevId) {
HILOGE("destDevId is different with localDevId and destDevId");

View File

@ -2162,7 +2162,7 @@ sptr<IDistributedSched> DistributedSchedService::GetRemoteDms(const std::string&
HILOGE("GetRemoteDms remoteDeviceId is empty");
return nullptr;
}
HILOGD("GetRemoteDms connect deviceid is %s", remoteDeviceId.c_str());
HILOGD("GetRemoteDms connect deviceid is %s", GetAnonymStr(remoteDeviceId).c_str());
auto samgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
if (samgr == nullptr) {
HILOGE("GetRemoteDms failed to connect to systemAbilityMgr!");
@ -2172,7 +2172,7 @@ sptr<IDistributedSched> DistributedSchedService::GetRemoteDms(const std::string&
auto object = samgr->CheckSystemAbility(DISTRIBUTED_SCHED_SA_ID, remoteDeviceId);
HILOGI("[PerformanceTest] GetRemoteDms end");
if (object == nullptr) {
HILOGE("GetRemoteDms failed to get remote DistributedSched %{private}s", remoteDeviceId.c_str());
HILOGE("GetRemoteDms failed to get remote DistributedSched %{private}s", GetAnonymStr(remoteDeviceId).c_str());
return nullptr;
}
return iface_cast<IDistributedSched>(object);
@ -2209,9 +2209,9 @@ bool DistributedSchedService::CheckDeviceIdFromRemote(const std::string& localDe
HILOGE("destinationDeviceId is not same with localDeviceId");
return false;
}
HILOGD("CheckDeviceIdFromRemote sourceDeviceId %s", sourceDeviceId.c_str());
HILOGD("CheckDeviceIdFromRemote localDeviceId %s", localDeviceId.c_str());
HILOGD("CheckDeviceIdFromRemote destinationDeviceId %s", destinationDeviceId.c_str());
HILOGD("CheckDeviceIdFromRemote sourceDeviceId %s", GetAnonymStr(sourceDeviceId).c_str());
HILOGD("CheckDeviceIdFromRemote localDeviceId %s", GetAnonymStr(localDeviceId).c_str());
HILOGD("CheckDeviceIdFromRemote destinationDeviceId %s", GetAnonymStr(destinationDeviceId).c_str());
if (sourceDeviceId == destinationDeviceId || sourceDeviceId == localDeviceId) {
HILOGE("destinationDeviceId is different with localDeviceId and destinationDeviceId");

View File

@ -618,8 +618,6 @@ int32_t DistributedSchedStub::StartContinuationInner(MessageParcel& data, Messag
HILOGI("get AccessTokenID = %{public}u", accessToken);
DistributedSchedPermission::GetInstance().MarkUriPermission(*want, accessToken);
std::string deviceId = want->GetElement().GetDeviceID();
// set in ability runtime, used to seperate callings from FA or stage model
want->RemoveParam(FEATURE_ABILITY_FLAG_KEY);
int32_t result = DSchedContinueManager::GetInstance().GetDSchedContinueByWant(*want, missionId) != nullptr

View File

@ -19,6 +19,7 @@
#include "bundle/bundle_manager_internal.h"
#include "distributed_sched_permission.h"
#include "distributed_sched_service.h"
#include "distributed_sched_utils.h"
#include "dtbschedmgr_device_info_storage.h"
#include "dtbschedmgr_log.h"
#include "ipc_skeleton.h"
@ -105,7 +106,7 @@ sptr<IDistributedSched> DmsTokenCallback::GetRemoteDms(const std::string& remote
HILOGE("GetRemoteDms remoteDeviceId is empty");
return nullptr;
}
HILOGD("GetRemoteDms connect deviceid is %s", remoteDeviceId.c_str());
HILOGD("GetRemoteDms connect deviceid is %s", GetAnonymStr(remoteDeviceId).c_str());
auto samgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
if (samgr == nullptr) {
HILOGE("GetRemoteDms failed to connect to systemAbilityMgr!");
@ -115,7 +116,7 @@ sptr<IDistributedSched> DmsTokenCallback::GetRemoteDms(const std::string& remote
auto object = samgr->CheckSystemAbility(DISTRIBUTED_SCHED_SA_ID, remoteDeviceId);
HILOGD("[PerformanceTest] GetRemoteDms end");
if (object == nullptr) {
HILOGE("GetRemoteDms failed to get remote DistributedSched %{private}s", remoteDeviceId.c_str());
HILOGE("GetRemoteDms failed to get remote DistributedSched %{private}s", GetAnonymStr(remoteDeviceId).c_str());
return nullptr;
}
return iface_cast<IDistributedSched>(object);

View File

@ -387,7 +387,8 @@ bool DmsBmStorage::GetBundleNameId(const std::string& bundleName, uint16_t &bund
return true;
}
}
HILOGE("get distributed bundleName no matching data: %{public}s %{public}d", udid.c_str(), bundleNameId);
HILOGE("get distributed bundleName no matching data: %{public}s %{public}d", GetAnonymStr(udid).c_str(),
bundleNameId);
return false;
}

View File

@ -108,7 +108,7 @@ sptr<IDistributedSched> DistributedSchedMissionManager::GetRemoteDms(const std::
}
}
}
HILOGD("GetRemoteDms connect deviceid is %s", deviceId.c_str());
HILOGD("GetRemoteDms connect deviceid is %s", GetAnonymStr(deviceId).c_str());
auto samgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
if (samgr == nullptr) {
HILOGE("GetRemoteDms failed to connect to systemAbilityMgr!");
@ -531,7 +531,7 @@ int32_t DistributedSchedMissionManager::StartSyncMissionsFromRemote(const Caller
void DistributedSchedMissionManager::StopSyncMissionsFromRemote(const std::string& networkId)
{
HILOGD(" %{private}s!", networkId.c_str());
HILOGD(" %{private}s!", GetAnonymStr(networkId).c_str());
{
std::lock_guard<std::mutex> autoLock(remoteSyncDeviceLock_);
remoteSyncDeviceSet_.erase(networkId);