diff --git a/frameworks/deviceauth_lite/source/os_account_adapter/os_account_adapter.cpp b/frameworks/deviceauth_lite/source/os_account_adapter/os_account_adapter.cpp index f7c7eeb9..e4665b93 100644 --- a/frameworks/deviceauth_lite/source/os_account_adapter/os_account_adapter.cpp +++ b/frameworks/deviceauth_lite/source/os_account_adapter/os_account_adapter.cpp @@ -29,10 +29,10 @@ int32_t GetFrontUserId(int32_t *userId) std::vector ids; int32_t errCode = OHOS::AccountSA::OsAccountManager::QueryActiveOsAccountIds(ids); if (errCode != ERR_OK || ids.empty()) { - LOGE("QueryActiveOsAccountIds failed"); + LOGE("[OsAccountNativeFwk][QueryActiveOsAccountIds]: failed"); return ERR_FAILED; } - LOGI("QueryActiveOsAccountIds success"); + LOGI("[OsAccountNativeFwk][QueryActiveOsAccountIds]: success"); *userId = ids[0]; #else LOGI("no os account part, set default user"); diff --git a/services/frameworks/src/net_observer/net_observer.cpp b/services/frameworks/src/net_observer/net_observer.cpp index f961bd53..d08d82b4 100644 --- a/services/frameworks/src/net_observer/net_observer.cpp +++ b/services/frameworks/src/net_observer/net_observer.cpp @@ -56,15 +56,15 @@ void NetObserver::StartObserver() } int32_t ret = NetConnClient::GetInstance().RegisterNetConnCallback(specifier, observer, 0); if (ret == NetConnResultCode::NET_CONN_SUCCESS) { - LOGI("[NetObserver]: Register net connection callback succeeded."); + LOGI("[NetMgrSubsysterm][RegisterNetConnCallback]: Register net connection callback succeeded."); g_netCallback = observer; return; } retryCount++; - LOGW("[NetObserver]: Register failed, errCode = %d, retry.", ret); + LOGW("[NetMgrSubsysterm][RegisterNetConnCallback]: Register failed, errCode = %d, retry.", ret); sleep(1); } while (retryCount < RETRY_MAX_TIMES); - LOGE("[NetObserver]: Register net connection callback failed!"); + LOGE("[NetMgrSubsysterm][RegisterNetConnCallback]: Register net connection callback failed!"); }); } @@ -126,7 +126,7 @@ void NetObserver::StopObserver() } int32_t ret = NetConnClient::GetInstance().UnregisterNetConnCallback(g_netCallback); if (ret == 0) { - LOGI("[NetObserver]: unregister net connection callback succeeded."); + LOGI("[NetMgrSubsysterm][UnregisterNetConnCallback]: unregister net connection callback succeeded."); g_netCallback = nullptr; } } \ No newline at end of file diff --git a/services/frameworks/src/os_account_adapter/os_account_adapter.cpp b/services/frameworks/src/os_account_adapter/os_account_adapter.cpp index 2c090e48..effbff29 100644 --- a/services/frameworks/src/os_account_adapter/os_account_adapter.cpp +++ b/services/frameworks/src/os_account_adapter/os_account_adapter.cpp @@ -183,12 +183,12 @@ int32_t GetCurrentActiveOsAccountId(void) std::vector activatedOsAccountIds; OHOS::ErrCode res = OHOS::AccountSA::OsAccountManager::QueryActiveOsAccountIds(activatedOsAccountIds); if ((res != OHOS::ERR_OK) || (activatedOsAccountIds.size() <= 0)) { - LOGE("[OsAccountAdapter]: QueryActiveOsAccountIds fail. [Res]: %d", res); + LOGE("[OsAccountNativeFwk][QueryActiveOsAccountIds]: fail. [Res]: %d", res); return INVALID_OS_ACCOUNT; } int osAccountId = activatedOsAccountIds[0]; if (osAccountId != SYSTEM_DEFAULT_USER) { - LOGI("[OsAccountAdapter]: Current active os accountId: %d", osAccountId); + LOGI("[OsAccountNativeFwk][QueryActiveOsAccountIds]: Current active os accountId: %d", osAccountId); } return osAccountId; } @@ -225,7 +225,8 @@ bool IsOsAccountUnlocked(int32_t osAccountId) bool isUnlocked = false; OHOS::ErrCode res = OHOS::AccountSA::OsAccountManager::IsOsAccountVerified(osAccountId, isUnlocked); if (res != OHOS::ERR_OK) { - LOGE("[OsAccountAdapter]: Check account verify status failed, res: %d, accountId: %d", res, osAccountId); + LOGE("[OsAccountNativeFwk][IsOsAccountVerified]: Check account verify status failed, res: %d, + accountId: %d", res, osAccountId); return false; } return isUnlocked; @@ -241,7 +242,7 @@ int32_t GetAllOsAccountIds(int32_t **osAccountIds, uint32_t *size) OHOS::ErrCode res = OHOS::AccountSA::OsAccountManager::QueryAllCreatedOsAccounts(osAccountInfos); uint32_t accountSize = osAccountInfos.size(); if ((res != OHOS::ERR_OK) || (accountSize <= 0)) { - LOGE("[OsAccountAdapter]: QueryAllCreatedOsAccounts failed. [Res]: %d", res); + LOGE("[OsAccountNativeFwk][QueryAllCreatedOsAccounts]: failed. [Res]: %d", res); return HC_ERROR; } *osAccountIds = (int32_t *)HcMalloc(accountSize * sizeof(int32_t), 0); diff --git a/services/frameworks/src/permission_adapter/permission_adapter.cpp b/services/frameworks/src/permission_adapter/permission_adapter.cpp index 42df3bb4..39b21d38 100644 --- a/services/frameworks/src/permission_adapter/permission_adapter.cpp +++ b/services/frameworks/src/permission_adapter/permission_adapter.cpp @@ -87,12 +87,12 @@ int32_t CheckPermission(int32_t methodId) AccessTokenID tokenId = IPCSkeleton::GetCallingTokenID(); ATokenTypeEnum tokenType = AccessTokenKit::GetTokenTypeFlag(tokenId); if (tokenType != TOKEN_NATIVE) { - LOGE("Invalid token type: %d", tokenType); + LOGE("[AccessTokenKit][GetTokenTypeFlag]: Invalid token type: %d", tokenType); return HC_ERROR; } NativeTokenInfo findInfo; if (AccessTokenKit::GetNativeTokenInfo(tokenId, findInfo) != 0) { - LOGE("GetNativeTokenInfo failed!"); + LOGE("[AccessTokenKit][GetNativeTokenInfo]: failed!"); return HC_ERROR; } if ((findInfo.apl != APL_SYSTEM_CORE) && (findInfo.apl != APL_SYSTEM_BASIC)) {