3900日志整改

Signed-off-by: zoulinken <zoulinken1@huawei.com>
This commit is contained in:
zoulinken 2024-07-29 15:46:40 +08:00
parent 226b4d135d
commit ad06621d05
31 changed files with 117 additions and 180 deletions

View File

@ -528,7 +528,7 @@ void LogPointInfo(const std::shared_ptr<MMI::PointerEvent>& pointerEvent, int32_
}
}
if (SystemProperties::GetDebugEnabled()) {
LOGI("point source: %{public}d", pointerEvent->GetSourceType());
LOGD("point source: %{public}d", pointerEvent->GetSourceType());
auto actionId = pointerEvent->GetPointerId();
MMI::PointerEvent::PointerItem item;
if (pointerEvent->GetPointerItem(actionId, item)) {

View File

@ -198,7 +198,7 @@ public:
void OnStatusBarBgColorChanged(uint32_t color) override
{
LOGI("StartsBar background color changed.");
LOGI("StatusBarBgColorChanged: %{public}u", color);
}
private:
@ -208,28 +208,28 @@ private:
extern "C" ACE_FORCE_EXPORT void* OHOS_ACE_CreateUIContent(void* context, void* runtime)
{
LOGI("Ace lib loaded, CreateUIContent.");
LOGI("CreateUIContent.");
Recorder::Init();
return new UIContentImpl(reinterpret_cast<OHOS::AbilityRuntime::Context*>(context), runtime);
}
extern "C" ACE_FORCE_EXPORT void* OHOS_ACE_CreateFormContent(void* context, void* runtime, bool isCard)
{
TAG_LOGI(AceLogTag::ACE_FORM, "Ace lib loaded, CreateFormUIContent.");
TAG_LOGI(AceLogTag::ACE_FORM, "CreateFormUIContent.");
Recorder::Init();
return new UIContentImpl(reinterpret_cast<OHOS::AbilityRuntime::Context*>(context), runtime, isCard);
}
extern "C" ACE_FORCE_EXPORT void* OHOS_ACE_CreateSubWindowUIContent(void* ability)
{
TAG_LOGI(AceLogTag::ACE_SUB_WINDOW, "Ace lib loaded, Create SubWindowUIContent.");
TAG_LOGI(AceLogTag::ACE_SUB_WINDOW, "Create SubWindowUIContent.");
Recorder::Init();
return new UIContentImpl(reinterpret_cast<OHOS::AppExecFwk::Ability*>(ability));
}
extern "C" ACE_FORCE_EXPORT void* OHOS_ACE_GetUIContent(int32_t instanceId)
{
LOGI("Ace lib loaded, GetUIContent.");
LOGI("GetUIContent: %{public}d", instanceId);
auto uiWindow = Platform::AceContainer::GetUIWindow(instanceId);
CHECK_NULL_RETURN(uiWindow, nullptr);
return uiWindow->GetUIContent();
@ -243,7 +243,6 @@ extern "C" ACE_FORCE_EXPORT char* OHOS_ACE_GetCurrentUIStackInfo()
CHECK_NULL_RETURN(pipeline, nullptr);
static auto tmp = pipeline->GetCurrentExtraInfo();
std::replace(tmp.begin(), tmp.end(), '\\', '/');
LOGI("UIContentImpl::GetCurrentExtraInfo:%{public}s", tmp.c_str());
return tmp.data();
}
@ -252,8 +251,7 @@ void AddAlarmLogFunc()
std::function<void(uint64_t, int, int)> logFunc = [](uint64_t nodeId, int count, int num) {
auto rsNode = Rosen::RSNodeMap::Instance().GetNode<Rosen::RSNode>(nodeId);
if (rsNode == nullptr) {
LOGI("rsNodeId = %{public}" PRId64 " send %{public}d commands, total number of rsNode is %{public}d"
"But cannot find the rsNode with this rsNodeId",
LOGI("rsNodeId:%{public}" PRId64 "not found, sendCommands:%{public}d, totalNumber:%{public}d",
nodeId, count, num);
return;
}
@ -261,13 +259,13 @@ void AddAlarmLogFunc()
auto frameNodeTag = rsNode->GetFrameNodeTag();
auto frameNode = NG::FrameNode::GetFrameNode(frameNodeTag, frameNodeId);
if (frameNode == nullptr) {
LOGI("frameNodeId = %{public}d, rsNodeId = %{public}" PRId64 " send %{public}d commands, "
"total number of rsNode is %{public}d. But cannot find the frameNode with this frameNodeId.",
LOGI("frameNodeId:%{public}d not found, rsNodeId:%{public}" PRId64 " sendCommands:%{public}d, "
"totalRsNodeNumber:%{public}d.",
frameNodeId, nodeId, count, num);
return;
}
LOGI("frameNodeId = %{public}d, rsNodeId = %{public}" PRId64 " send %{public}d commands, "
"the tag of corresponding frame node is %{public}s, total number of rsNode is %{public}d",
LOGI("frameNodeId:%{public}d found, rsNodeId:%{public}" PRId64 " sendCommands:%{public}d, "
"FrameNodeTag:%{public}s, totalRsNodeNumber:%{public}d",
frameNodeId, nodeId, count, frameNodeTag.c_str(), num);
};
@ -287,7 +285,7 @@ public:
double positionY = info->textFieldPositionY_;
double height = info->textFieldHeight_;
Rect keyboardRect = Rect(rect.posX_, rect.posY_, rect.width_, rect.height_);
LOGI("UIContent OccupiedAreaChange rect:%{public}s type: %{public}d, positionY:%{public}f, height:%{public}f, "
LOGI("OccupiedAreaChange rect:%{public}s type: %{public}d, positionY:%{public}f, height:%{public}f, "
"instanceId_ %{public}d",
keyboardRect.ToString().c_str(), type, positionY, height, instanceId_);
if (type == OHOS::Rosen::OccupiedAreaType::TYPE_INPUT) {
@ -634,12 +632,12 @@ UIContentErrorCode UIContentImpl::InitializeInner(
// ArkTSCard need no window : 梳理所有需要window和不需要window的场景
if (isFormRender_ && !window) {
LOGI("[%{public}s][%{public}s][%{public}d]: CommonInitializeForm url = %{public}s", bundleName_.c_str(),
LOGI("[%{public}s][%{public}s][%{public}d]: CommonInitializeForm url: %{public}s", bundleName_.c_str(),
moduleName_.c_str(), instanceId_, contentInfo.c_str());
errorCode = CommonInitializeForm(window, contentInfo, storage);
CHECK_ERROR_CODE_RETURN(errorCode);
}
LOGI("[%{public}s][%{public}s][%{public}d]: Initialize startUrl = %{public}s", bundleName_.c_str(),
LOGI("[%{public}s][%{public}s][%{public}d]: Initialize: %{public}s", bundleName_.c_str(),
moduleName_.c_str(), instanceId_, startUrl_.c_str());
// run page.
errorCode = Platform::AceContainer::RunPage(instanceId_, startUrl_, "", isNamedRouter);
@ -663,7 +661,7 @@ void UIContentImpl::PreInitializeForm(OHOS::Rosen::Window* window, const std::st
{
// ArkTSCard need no window
if (isFormRender_ && !window) {
LOGI("[%{public}s][%{public}s][%{public}d]: CommonInitializeForm url = %{public}s", bundleName_.c_str(),
LOGI("[%{public}s][%{public}s][%{public}d]: InitializeForm: %{public}s", bundleName_.c_str(),
moduleName_.c_str(), instanceId_, url.c_str());
CommonInitializeForm(window, url, storage);
AddWatchSystemParameter();
@ -672,7 +670,7 @@ void UIContentImpl::PreInitializeForm(OHOS::Rosen::Window* window, const std::st
void UIContentImpl::RunFormPage()
{
LOGI("[%{public}s][%{public}s][%{public}d]: Initialize startUrl = %{public}s",
LOGI("[%{public}s][%{public}s][%{public}d]: Initialize startUrl: %{public}s",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, startUrl_.c_str());
// run page.
Platform::AceContainer::RunPage(instanceId_, startUrl_, formData_, false);
@ -733,8 +731,8 @@ void UIContentImpl::InitializeDynamic(const std::string& hapPath, const std::str
CommonInitializeForm(nullptr, abcPath, nullptr);
AddWatchSystemParameter();
LOGI("[%{public}s][%{public}s][%{public}d]: Initialize DynamicComponent startUrl "
"= %{public}s, entryPoint = %{public}s",
LOGI("[%{public}s][%{public}s][%{public}d]: InitializeDynamic, startUrl"
": %{public}s, entryPoint: %{public}s",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, startUrl_.c_str(), entryPoint.c_str());
Platform::AceContainer::RunDynamicPage(instanceId_, startUrl_, "", entryPoint);
auto distributedUI = std::make_shared<NG::DistributedUI>();
@ -747,7 +745,8 @@ void UIContentImpl::Initialize(
{
if (window == nullptr) {
LOGE("UIExtensionAbility [%{public}s][%{public}s][%{public}d][%{public}s] initialize ui instance failed, the"
"window is invalid", bundleName_.c_str(), moduleName_.c_str(), instanceId_, startUrl_.c_str());
"window is invalid",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, startUrl_.c_str());
return;
}
auto errorCode = CommonInitialize(window, url, storage, focusWindowId);
@ -756,7 +755,7 @@ void UIContentImpl::Initialize(
}
AddWatchSystemParameter();
LOGI("[%{public}s][%{public}s][%{public}d]: UIExtension startUrl = %{public}s",
TAG_LOGI(AceLogTag::ACE_UIEXTENSIONCOMPONENT, "[%{public}s][%{public}s][%{public}d]: StartUIExtension: %{public}s",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, startUrl_.c_str());
// run page.
Platform::AceContainer::RunPage(instanceId_, startUrl_, "");
@ -794,7 +793,7 @@ napi_value UIContentImpl::GetUINapiContext()
UIContentErrorCode UIContentImpl::Restore(
OHOS::Rosen::Window* window, const std::string& contentInfo, napi_value storage, ContentInfoType type)
{
LOGI("UIContent Restore with contentInfo size: %{public}d, ContentInfotype: %{public}d",
LOGI("Restore with contentInfo size: %{public}d, ContentInfotype: %{public}d",
static_cast<int32_t>(contentInfo.size()), static_cast<int32_t>(type));
auto errorCode = UIContentErrorCode::NO_ERRORS;
errorCode = CommonInitialize(window, contentInfo, storage);
@ -804,9 +803,9 @@ UIContentErrorCode UIContentImpl::Restore(
startUrl_ = record.url;
CHECK_ERROR_CODE_RETURN(errorCode);
if (startUrl_.empty()) {
LOGW("UIContent Restore start url is empty");
LOGW("Restore start url is empty");
}
LOGI("[%{public}s][%{public}s][%{public}d]: Restore startUrl = %{public}s, isNamedRouter: %{public}s",
LOGI("[%{public}s][%{public}s][%{public}d]: Restore startUrl: %{public}s, isNamedRouter: %{public}s",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, startUrl_.c_str(),
(record.isNamedRouter ? "yes" : "no"));
return Platform::AceContainer::RunPage(instanceId_, startUrl_, record.params, record.isNamedRouter);
@ -814,7 +813,7 @@ UIContentErrorCode UIContentImpl::Restore(
std::string UIContentImpl::GetContentInfo(ContentInfoType type) const
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContent GetContentInfo, ContentInfoType: %{public}d",
LOGI("[%{public}s][%{public}s][%{public}d]: GetContentInfoType: %{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, type);
return Platform::AceContainer::GetContentInfo(instanceId_, type);
}
@ -891,10 +890,10 @@ UIContentErrorCode UIContentImpl::CommonInitializeForm(
}
if (resConfig->GetColorMode() == OHOS::Global::Resource::ColorMode::DARK) {
SystemProperties::SetColorMode(ColorMode::DARK);
LOGI("UIContent set dark mode");
LOGI("Set dark mode");
} else {
SystemProperties::SetColorMode(ColorMode::LIGHT);
LOGI("UIContent set light mode");
LOGI("Set light mode");
}
SystemProperties::SetDeviceAccess(
resConfig->GetInputDevice() == Global::Resource::InputDevice::INPUTDEVICE_POINTINGDEVICE);
@ -1048,7 +1047,7 @@ UIContentErrorCode UIContentImpl::CommonInitializeForm(
auto abilityContext =
OHOS::AbilityRuntime::Context::ConvertTo<OHOS::AbilityRuntime::AbilityContext>(sharedContext);
CHECK_NULL_VOID(abilityContext);
LOGI("start ability with url = %{private}s", address.c_str());
LOGI("Start ability: %{private}s", address.c_str());
AAFwk::Want want;
want.AddEntity(Want::ENTITY_BROWSER);
want.SetUri(address);
@ -1417,7 +1416,7 @@ UIContentErrorCode UIContentImpl::CommonInitialize(
}
SystemProperties::SetDeviceAccess(
resConfig->GetInputDevice() == Global::Resource::InputDevice::INPUTDEVICE_POINTINGDEVICE);
LOGI("[%{public}s][%{public}s][%{public}d]: Set SystemProperties language: %{public}s, colorMode: %{public}s, "
LOGI("[%{public}s][%{public}s][%{public}d]: SetLanguage: %{public}s, colorMode: %{public}s, "
"deviceAccess: %{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_,
AceApplicationInfo::GetInstance().GetLanguage().c_str(),
@ -1563,7 +1562,7 @@ UIContentErrorCode UIContentImpl::CommonInitialize(
auto abilityContext =
OHOS::AbilityRuntime::Context::ConvertTo<OHOS::AbilityRuntime::AbilityContext>(sharedContext);
CHECK_NULL_VOID(abilityContext);
LOGI("start ability with url = %{private}s", address.c_str());
LOGI("startAbility: %{private}s", address.c_str());
AAFwk::Want want;
want.AddEntity(Want::ENTITY_BROWSER);
want.SetUri(address);
@ -1698,7 +1697,6 @@ UIContentErrorCode UIContentImpl::CommonInitialize(
// after frontend initialize
if (window_->IsFocused()) {
LOGI("UIContentImpl: focus again");
Focus();
}
@ -1981,14 +1979,14 @@ uint32_t UIContentImpl::GetBackgroundColor()
},
TaskExecutor::TaskType::UI, "ArkUIGetAppBackgroundColor");
LOGD("[%{public}s][%{public}s][%{public}d]: UIContentImpl GetBackgroundColor, value is %{public}u",
LOGD("[%{public}s][%{public}s][%{public}d]: GetBackgroundColor:%{public}u",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, bgColor);
return bgColor;
}
void UIContentImpl::SetBackgroundColor(uint32_t color)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: SetBackgroundColor color is %{public}u",
LOGI("[%{public}s][%{public}s][%{public}d]: SetBackgroundColor:%{public}u",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, color);
auto container = AceEngine::Get().GetContainer(instanceId_);
CHECK_NULL_VOID(container);
@ -2127,8 +2125,6 @@ bool UIContentImpl::ProcessVsyncEvent(uint64_t timeStampNanos)
void UIContentImpl::UpdateConfiguration(const std::shared_ptr<OHOS::AppExecFwk::Configuration>& config)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: UpdateConfiguration called", bundleName_.c_str(),
moduleName_.c_str(), instanceId_);
CHECK_NULL_VOID(config);
auto dialogContainer = Platform::DialogContainer::GetContainer(instanceId_);
@ -2161,7 +2157,6 @@ void UIContentImpl::UpdateConfiguration(const std::shared_ptr<OHOS::AppExecFwk::
parsedConfig.mnc = config->GetItem(OHOS::AAFwk::GlobalConfigurationKey::SYSTEM_MNC);
// EtsCard Font followSytem disable
if (formFontUseDefault) {
LOGW("[%{public}s] UIContentImpl: UpdateConfiguration use default", bundleName.c_str());
parsedConfig.fontScale = "1.0";
} else {
parsedConfig.fontScale = config->GetItem(OHOS::AAFwk::GlobalConfigurationKey::SYSTEM_FONT_SIZE_SCALE);
@ -2169,7 +2164,7 @@ void UIContentImpl::UpdateConfiguration(const std::shared_ptr<OHOS::AppExecFwk::
parsedConfig.fontWeightScale =
config->GetItem(OHOS::AAFwk::GlobalConfigurationKey::SYSTEM_FONT_WEIGHT_SCALE);
container->UpdateConfiguration(parsedConfig, config->GetName());
LOGI("[%{public}d][%{public}s][%{public}s] UIContentImpl: UpdateConfiguration called End, name:%{public}s",
LOGI("[%{public}d][%{public}s][%{public}s] UpdateConfiguration, name:%{public}s",
instanceId, bundleName.c_str(), moduleName.c_str(), config->GetName().c_str());
},
TaskExecutor::TaskType::UI, "ArkUIUIContentUpdateConfiguration");
@ -2178,7 +2173,7 @@ void UIContentImpl::UpdateConfiguration(const std::shared_ptr<OHOS::AppExecFwk::
void UIContentImpl::UpdateViewportConfig(const ViewportConfig& config, OHOS::Rosen::WindowSizeChangeReason reason,
const std::shared_ptr<OHOS::Rosen::RSTransaction>& rsTransaction)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: UpdateViewportConfig %{public}s", bundleName_.c_str(),
LOGI("[%{public}s][%{public}s][%{public}d]: UpdateViewportConfig %{public}s", bundleName_.c_str(),
moduleName_.c_str(), instanceId_, config.ToString().c_str());
SystemProperties::SetDeviceOrientation(config.Orientation());
TAG_LOGI(
@ -2252,7 +2247,7 @@ void UIContentImpl::UpdateViewportConfig(const ViewportConfig& config, OHOS::Ros
void UIContentImpl::SetIgnoreViewSafeArea(bool ignoreViewSafeArea)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: SetIgnoreViewSafeArea:%{public}u", bundleName_.c_str(),
LOGI("[%{public}s][%{public}s][%{public}d]: SetIgnoreViewSafeArea:%{public}u", bundleName_.c_str(),
moduleName_.c_str(), instanceId_, ignoreViewSafeArea);
auto container = AceEngine::Get().GetContainer(instanceId_);
CHECK_NULL_VOID(container);
@ -2274,16 +2269,14 @@ void UIContentImpl::SetIgnoreViewSafeArea(bool ignoreViewSafeArea)
void UIContentImpl::UpdateWindowMode(OHOS::Rosen::WindowMode mode, bool hasDeco)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: UpdateWindowMode, window mode is %{public}d, hasDeco is "
"%{public}d",
LOGI("[%{public}s][%{public}s][%{public}d]: UpdateWindowMode: %{public}d, hasDeco: %{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, mode, hasDeco);
UpdateDecorVisible(mode == OHOS::Rosen::WindowMode::WINDOW_MODE_FLOATING, hasDeco);
}
void UIContentImpl::UpdateDecorVisible(bool visible, bool hasDeco)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: UpdateWindowMode, window visible is %{public}d, hasDeco "
"is %{public}d",
LOGI("[%{public}s][%{public}s][%{public}d]: UpdateWindowVisible: %{public}d, hasDeco: %{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, visible, hasDeco);
auto container = Platform::AceContainer::GetContainer(instanceId_);
CHECK_NULL_VOID(container);
@ -2310,7 +2303,7 @@ void UIContentImpl::SetUIContentType(UIContentType uIContentType)
void UIContentImpl::UpdateMaximizeMode(OHOS::Rosen::MaximizeMode mode)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: UpdateMaximizeMode, maximize mode is %{public}d",
LOGI("[%{public}s][%{public}s][%{public}d]: UpdateMaximizeMode: %{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, mode);
auto container = Platform::AceContainer::GetContainer(instanceId_);
CHECK_NULL_VOID(container);
@ -2368,7 +2361,7 @@ void UIContentImpl::HideWindowTitleButton(bool hideSplit, bool hideMaximize, boo
void UIContentImpl::UpdateTitleInTargetPos(bool isShow, int32_t height)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: UpdateTitleInTargetPos, isShow %{public}d, height is "
LOGI("[%{public}s][%{public}s][%{public}d]: UpdateTitleInTargetPos, isShow: %{public}d, height: "
"%{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, isShow, height);
auto container = Platform::AceContainer::GetContainer(instanceId_);
@ -2433,7 +2426,7 @@ void UIContentImpl::UpdateDialogResourceConfiguration(RefPtr<Container>& contain
void UIContentImpl::InitializeSubWindow(OHOS::Rosen::Window* window, bool isDialog)
{
window_ = window;
LOGI("The window name is %{public}s", window->GetWindowName().c_str());
LOGI("InitSubwindow: %{public}s", window->GetWindowName().c_str());
CHECK_NULL_VOID(window_);
RefPtr<Container> container;
instanceId_ = Container::GenerateId<COMPONENT_SUBWINDOW_CONTAINER>();
@ -2453,20 +2446,17 @@ void UIContentImpl::InitializeSubWindow(OHOS::Rosen::Window* window, bool isDial
container = AceType::MakeRefPtr<Platform::AceContainer>(instanceId_, frontendType,
context, abilityInfo, std::make_unique<ContentEventCallback>([] {
// Sub-window ,just return.
LOGI("Content event callback");
}), false, true, true);
#else
if (Container::IsCurrentUseNewPipeline()) {
container = AceType::MakeRefPtr<Platform::AceContainer>(instanceId_, frontendType,
context, abilityInfo, std::make_unique<ContentEventCallback>([] {
// Sub-window ,just return.
LOGI("Content event callback");
}), false, true, true);
} else {
container = AceType::MakeRefPtr<Platform::AceContainer>(instanceId_, frontendType,
context, abilityInfo, std::make_unique<ContentEventCallback>([] {
// Sub-window ,just return.
LOGI("Content event callback");
}), false, true);
}
#endif
@ -2515,13 +2505,13 @@ void UIContentImpl::SetFrameLayoutFinishCallback(std::function<void()>&& callbac
auto pipelineContext = AceType::DynamicCast<NG::PipelineContext>(container->GetPipelineContext());
CHECK_NULL_VOID(pipelineContext);
pipelineContext->AddPersistAfterLayoutTask(std::move(callback));
LOGI("[%{public}s][%{public}s][%{public}d]: SetFrameLayoutFinishCallback SUCCESS", bundleName_.c_str(),
LOGI("[%{public}s][%{public}s][%{public}d]: SetFrameLayoutFinishCallback", bundleName_.c_str(),
moduleName_.c_str(), instanceId_);
}
void UIContentImpl::NotifyMemoryLevel(int32_t level)
{
LOGI("[%{public}s][%{public}s][%{public}d]: Receive Memory level notification, level: %{public}d",
LOGI("[%{public}s][%{public}s][%{public}d]: NotifyMemoryLevel: %{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, level);
auto container = Platform::AceContainer::GetContainer(instanceId_);
CHECK_NULL_VOID(container);
@ -2538,7 +2528,7 @@ void UIContentImpl::SetAppWindowTitle(const std::string& title)
auto pipelineContext = container->GetPipelineContext();
CHECK_NULL_VOID(pipelineContext);
ContainerScope scope(instanceId_);
LOGI("[%{public}s][%{public}s][%{public}d]: set app title", bundleName_.c_str(), moduleName_.c_str(), instanceId_);
LOGI("[%{public}s][%{public}s][%{public}d]: setAppTitle", bundleName_.c_str(), moduleName_.c_str(), instanceId_);
pipelineContext->SetAppTitle(title);
}
@ -2549,7 +2539,7 @@ void UIContentImpl::SetAppWindowIcon(const std::shared_ptr<Media::PixelMap>& pix
auto pipelineContext = container->GetPipelineContext();
CHECK_NULL_VOID(pipelineContext);
ContainerScope scope(instanceId_);
LOGI("[%{public}s][%{public}s][%{public}d]: set app icon", bundleName_.c_str(), moduleName_.c_str(), instanceId_);
LOGI("[%{public}s][%{public}s][%{public}d]: setAppIcon", bundleName_.c_str(), moduleName_.c_str(), instanceId_);
pipelineContext->SetAppIcon(AceType::MakeRefPtr<PixelMapOhos>(pixelMap));
}
@ -2664,7 +2654,7 @@ void UIContentImpl::OnFormSurfaceChange(float width, float height)
void UIContentImpl::SetFormBackgroundColor(const std::string& color)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: SetFormBackgroundColor color is %{public}s",
LOGI("[%{public}s][%{public}s][%{public}d]: SetFormBackgroundColor: %{public}s",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, color.c_str());
if (!Rosen::RSSystemProperties::GetUniRenderEnabled()) {
// cannot set transparent background effects in not-uniform-render mode
@ -2694,7 +2684,7 @@ void UIContentImpl::SetFormBackgroundColor(const std::string& color)
void UIContentImpl::SetFontScaleFollowSystem(const bool fontScaleFollowSystem)
{
LOGI("UIContentImpl: SetFontScaleFollowSystem flag is %{public}s", fontScaleFollowSystem ? "true" : "false");
LOGI("SetFontScaleFollowSystem: %{public}d", fontScaleFollowSystem);
fontScaleFollowSystem_ = fontScaleFollowSystem;
}
@ -2806,8 +2796,10 @@ int32_t UIContentImpl::CreateModalUIExtension(
sessionId = overlay->CreateModalUIExtension(want, callbacks, config);
},
TaskExecutor::TaskType::UI, "ArkUICreateModalUIExtension");
LOGI("[%{public}s][%{public}s][%{public}d]: UIExtension create modal page end, sessionId=%{public}d, "
"isProhibitBack=%{public}d, isAsyncModalBinding=%{public}d, isAllowedBeCovered=%{public}d",
TAG_LOGI(AceLogTag::ACE_UIEXTENSIONCOMPONENT,
"[%{public}s][%{public}s][%{public}d]: create modal page, "
"sessionId=%{public}d, isProhibitBack=%{public}d, isAsyncModalBinding=%{public}d, "
"isAllowedBeCovered=%{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, sessionId, config.isProhibitBack,
config.isAsyncModalBinding, config.isAllowedBeCovered);
return sessionId;
@ -2815,8 +2807,9 @@ int32_t UIContentImpl::CreateModalUIExtension(
void UIContentImpl::CloseModalUIExtension(int32_t sessionId)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIExtension close modal page start, "
"sessionId=%{public}d",
TAG_LOGI(AceLogTag::ACE_UIEXTENSIONCOMPONENT,
"[%{public}s][%{public}s][%{public}d]: close modal page, "
"sessionId=%{public}d",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, sessionId);
if (sessionId == 0) {
LOGW("UIExtension refuse to close modal page");
@ -3134,13 +3127,15 @@ int32_t UIContentImpl::CreateCustomPopupUIExtension(
SetCustomPopupConfig(nodeId, config, uiExtNode->GetId());
},
TaskExecutor::TaskType::UI, "ArkUIUIExtensionCreateCustomPopup");
LOGI("Create custom popup with UIExtension end, nodeId=%{public}d", nodeId);
TAG_LOGI(
AceLogTag::ACE_UIEXTENSIONCOMPONENT, "Create custom popup with UIExtension end, nodeId=%{public}d", nodeId);
return nodeId;
}
void UIContentImpl::DestroyCustomPopupUIExtension(int32_t nodeId)
{
LOGI("[%{public}s][%{public}s][%{public}d]: Destroy custom popup start, nodeId=%{public}d", bundleName_.c_str(),
TAG_LOGI(AceLogTag::ACE_UIEXTENSIONCOMPONENT,
"[%{public}s][%{public}s][%{public}d]: Destroy custom popup start, nodeId=%{public}d", bundleName_.c_str(),
moduleName_.c_str(), instanceId_, nodeId);
auto container = Platform::AceContainer::GetContainer(instanceId_);
CHECK_NULL_VOID(container);
@ -3283,7 +3278,6 @@ void UIContentImpl::ChangeSensitiveNodes(bool isSensitive)
auto container = Platform::AceContainer::GetContainer(instanceId_);
CHECK_NULL_VOID(container);
ContainerScope scope(instanceId_);
LOGI("UIContentImpl::ChangeSensitiveNodes");
auto pipeline = container->GetPipelineContext();
CHECK_NULL_VOID(pipeline);
auto taskExecutor = container->GetTaskExecutor();
@ -3295,8 +3289,6 @@ void UIContentImpl::ChangeSensitiveNodes(bool isSensitive)
void UIContentImpl::UpdateTransform(const OHOS::Rosen::Transform& transform)
{
LOGI("[%{public}s][%{public}s][%{public}d]: UIContentImpl: UpdateTransform, window scale is %{public}f",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, transform.scaleX_);
auto container = Platform::AceContainer::GetContainer(instanceId_);
CHECK_NULL_VOID(container);
ContainerScope scope(instanceId_);

View File

@ -126,6 +126,8 @@ const std::unordered_map<AceLogTag, const char*> g_DOMAIN_CONTENTS_MAP = {
{ AceLogTag::ACE_WINDOW, "AceWindow" },
{ AceLogTag::ACE_WINDOW_PIPELINE, "AceWindowPipeline" },
{ AceLogTag::ACE_INPUTKEYFLOW, "InputKeyFlow"},
{ AceLogTag::ACE_APPBAR, "AceAppBar"},
{ AceLogTag::ACE_SELECT_OVERLAY, "AceSelectOverlay"},
};
// initial static member object
LogLevel LogWrapper::level_ = LogLevel::DEBUG;

View File

@ -192,6 +192,8 @@ enum AceLogTag : uint8_t {
ACE_SECURITYUIEXTENSION, // C0394F
ACE_WINDOW_PIPELINE, // C03950
ACE_INPUTKEYFLOW, // C03951
ACE_APPBAR, // C03952
ACE_SELECT_OVERLAY, // C03953
FORM_RENDER = 255, // C039FF FormRenderer, last domain, do not add
};

View File

@ -64,7 +64,7 @@ void JsFunctionBase::Execute(const std::vector<std::string>& keys, const std::st
const std::string key = *iter;
const auto value = argsPtr->GetValue(key);
if (!value) {
LOGI("key[%{public}s] is not exist.", key.c_str());
LOGD("key[%{public}s] not exist.", key.c_str());
continue;
}
ExecuteInternal(value, key, eventInfo);

View File

@ -1677,7 +1677,7 @@ bool JsiDeclarativeEngine::LoadPageSource(
const std::function<void(const std::string&, int32_t)>& errorCallback)
{
ACE_SCOPED_TRACE("JsiDeclarativeEngine::LoadPageSource");
LOGI("JsiDeclarativeEngine LoadJs by buffer");
LOGI("LoadJs by buffer");
ACE_DCHECK(engineInstance_);
auto container = Container::Current();
CHECK_NULL_RETURN(container, false);
@ -1710,9 +1710,11 @@ void JsiDeclarativeEngine::AddToNamedRouterMap(const EcmaVM* vm, panda::Global<p
return;
}
LOGI("add named router record, name: %{public}s, bundleName: %{public}s, moduleName: %{public}s, "
"pagePath: %{public}s, pageFullPath: %{public}s, ohmUrl: %{public}s", namedRoute.c_str(), bundleName.c_str(),
moduleName.c_str(), pagePath.c_str(), pageFullPath.c_str(), ohmUrl.c_str());
TAG_LOGI(AceLogTag::ACE_ROUTER,
"add named router record, name: %{public}s, bundleName: %{public}s, moduleName: %{public}s, "
"pagePath: %{public}s, pageFullPath: %{public}s, ohmUrl: %{public}s",
namedRoute.c_str(), bundleName.c_str(), moduleName.c_str(), pagePath.c_str(), pageFullPath.c_str(),
ohmUrl.c_str());
NamedRouterProperty namedRouterProperty({ pageGenerator, bundleName, moduleName, pagePath, ohmUrl });
auto ret = namedRouterRegisterMap_.insert(std::make_pair(namedRoute, namedRouterProperty));
if (!ret.second) {
@ -1955,26 +1957,27 @@ void JsiDeclarativeEngine::PreloadNamedRouter(const std::string& name, std::func
const auto& moduleName = it->second.moduleName;
const auto& pagePath = it->second.pagePath;
std::string ohmUrl = it->second.ohmUrl + ".js";
LOGI("preload named rotuer, bundleName: %{public}s, moduleName: %{public}s, pagePath: %{public}s, "
"ohmUrl: %{public}s", bundleName.c_str(), moduleName.c_str(), pagePath.c_str(), ohmUrl.c_str());
TAG_LOGI(AceLogTag::ACE_ROUTER, "preload named rotuer, bundleName:"
"%{public}s, moduleName: %{public}s, pagePath: %{public}s, ohmUrl: %{public}s",
bundleName.c_str(), moduleName.c_str(), pagePath.c_str(), ohmUrl.c_str());
auto callback = [weak = AceType::WeakClaim(this), ohmUrl, finishCallback = loadFinishCallback]() {
auto jsEngine = weak.Upgrade();
CHECK_NULL_VOID(jsEngine);
bool loadSuccess = true;
jsEngine->LoadPageSource(ohmUrl,
[ohmUrl, &loadSuccess](const std::string& errorMsg, int32_t errorCode) {
LOGW("Failed to load page source: %{public}s, errorCode: %{public}d, errorMsg: %{public}s",
ohmUrl.c_str(), errorCode, errorMsg.c_str());
loadSuccess = false;
});
jsEngine->LoadPageSource(ohmUrl, [ohmUrl, &loadSuccess](const std::string& errorMsg, int32_t errorCode) {
TAG_LOGW(AceLogTag::ACE_ROUTER,
"Failed to load page source: %{public}s, errorCode: %{public}d, errorMsg: %{public}s", ohmUrl.c_str(),
errorCode, errorMsg.c_str());
loadSuccess = false;
});
if (finishCallback) {
finishCallback(loadSuccess);
}
};
auto silentInstallErrorCallBack = [finishCallback = loadFinishCallback](
int32_t errorCode, const std::string& errorMsg) {
LOGW("Failed to preload named router, error = %{public}d, errorMsg = %{public}s",
int32_t errorCode, const std::string& errorMsg) {
TAG_LOGW(AceLogTag::ACE_ROUTER, "Failed to preload named router, error = %{public}d, errorMsg = %{public}s",
errorCode, errorMsg.c_str());
if (finishCallback) {
finishCallback(false);
@ -2815,13 +2818,11 @@ bool JsiDeclarativeEngineInstance::RegisterStringCacheTable(const EcmaVM* vm, in
return false;
}
if (static_cast<uint32_t>(size) > MAX_STRING_CACHE_SIZE) {
TAG_LOGE(AceLogTag::ACE_DEFAULT_DOMAIN, "string cache table is oversize");
return false;
}
bool res = panda::ExternalStringCache::RegisterStringCacheTable(vm, size);
if (!res) {
TAG_LOGI(AceLogTag::ACE_DEFAULT_DOMAIN, "string cache table has been registered");
return false;
}
SetCachedString(vm);

View File

@ -161,19 +161,16 @@ int32_t FrontendDelegateDeclarative::GetMinPlatformVersion()
UIContentErrorCode FrontendDelegateDeclarative::RunPage(
const std::string& url, const std::string& params, const std::string& profile, bool isNamedRouter)
{
LOGI("FrontendDelegateDeclarative RunPage url=%{public}s", url.c_str());
LOGI("RunPage:%{public}s", url.c_str());
std::string jsonContent;
if (GetAssetContent(MANIFEST_JSON, jsonContent)) {
manifestParser_->Parse(jsonContent);
manifestParser_->Printer();
} else if (!profile.empty() && GetAssetContent(profile, jsonContent)) {
LOGI("Parse profile %{public}s", profile.c_str());
manifestParser_->Parse(jsonContent);
} else if (GetAssetContent(PAGES_JSON, jsonContent)) {
LOGI("Parse main_pages.json");
manifestParser_->Parse(jsonContent);
} else {
LOGE("RunPage parse manifest.json failed");
EventReport::SendPageRouterException(PageRouterExcepType::RUN_PAGE_ERR, url);
return UIContentErrorCode::PARSE_MANIFEST_FAILED;
}

View File

@ -520,7 +520,6 @@ public:
}
if (!jsValue->IsObject()) {
LOGE("arg is not number or Object.");
return false;
}
JSRef<JSObject> jsObj = JSRef<JSObject>::Cast(jsValue);
@ -531,7 +530,6 @@ public:
JSRef<JSVal> resId = jsObj->GetProperty("id");
if (!resId->IsNumber()) {
LOGW("resId is not number");
return false;
}

View File

@ -619,13 +619,11 @@ void GetPackageInfoCallback(
void GetPackageInfo(const shared_ptr<JsRuntime>& runtime, const shared_ptr<JsValue>& arg)
{
if (!arg->IsObject(runtime) || !arg->IsArray(runtime)) {
LOGE("GetPackageInfo: arg is not Object or Array");
return;
}
int32_t len = arg->GetArrayLength(runtime);
if (len < static_cast<int32_t>(PAG_INFO_ARGS_LEN)) {
LOGE("GetPackageInfo: invalid callback value");
return;
}
shared_ptr<JsValue> message = arg->GetElement(runtime, PAG_INFO_ARGS_MSG_IDX);

View File

@ -62,7 +62,7 @@ RefPtr<Asset> AssetManagerImpl::GetAsset(const std::string& assetName)
}
}
LOGW("GetAsset failed, assetName = %{public}s", assetName.c_str());
LOGW("GetAsset failed: %{public}s", assetName.c_str());
return nullptr;
}

View File

@ -304,21 +304,18 @@ void ParseFontFeatureSetting(
const std::string& fontFeatureSetting, FONT_FEATURES_LIST& fontFeatures)
{
if (fontFeatureSetting.empty()) {
LOGW("ParseFontFeatureSetting fontFeatureSetting is empty");
return;
}
auto temp = fontFeatureSetting;
StringUtils::TrimStrLeadingAndTrailing(temp);
if (temp.empty()) {
LOGW("ParseFontFeatureSetting fontFeatureSetting is empty");
return;
}
std::vector<std::string> value;
StringUtils::StringSplitter(temp, ' ', value);
if (value.empty() || value.size() > FONT_FEATURE_MAX_SIZE || value[0].size() != FONT_FEATURE_KEY_LENGTH) {
LOGW("ParseFontFeatureSetting param is invalid");
return;
}
@ -330,7 +327,6 @@ void ParseFontFeatureSetting(
fontFeatures.emplace_back(std::make_pair(value[0], ParseFontFeatureParameters(value[1])));
break;
default:
LOGW("ParseFontFeatureSetting format of font-feature-settings is invalid");
break;
}
}

View File

@ -459,7 +459,6 @@ void FocusHub::SetFocusable(bool focusable, bool isExplicit)
if (isExplicit) {
isFocusableExplicit_ = true;
} else if (isFocusableExplicit_) {
LOGI("Current focusHub cannot be set to focusable implicitly.");
return;
} else {
implicitFocusable_ = focusable;

View File

@ -263,7 +263,8 @@ void SelectContentOverlayManager::UpdateExistOverlay(const SelectOverlayInfo& in
handlePattern->UpdateIsSingleHandle(info.isSingleHandle);
handlePattern->UpdateIsShowHandleLine(info.isHandleLineShow);
handlePattern->UpdateFirstAndSecondHandleInfo(info.firstHandle, info.secondHandle);
LOGI("SelectOverlay: Update first %{public}s isShow %{public}d, second %{public}s isShow %{public}d",
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY,
"Update first %{public}s isShow %{public}d, second %{public}s isShow %{public}d",
info.firstHandle.paintRect.ToString().c_str(), info.firstHandle.isShow,
info.secondHandle.paintRect.ToString().c_str(), info.secondHandle.isShow);
if (info.isSingleHandle) {
@ -290,7 +291,7 @@ void SelectContentOverlayManager::SwitchToHandleMode(HandleLevelMode mode, bool
}
selectOverlayHolder_->GetCallback()->OnHandleLevelModeChanged(mode);
}
LOGI("SelectOverlay: Set handle node to mode: %{public}d", mode);
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "Set handle mode: %{public}d", mode);
shareOverlayInfo_->handleLevelMode = mode;
auto handleNode = handleNode_.Upgrade();
CHECK_NULL_VOID(handleNode);
@ -425,7 +426,8 @@ void SelectContentOverlayManager::CreateNormalSelectOverlay(SelectOverlayInfo& i
void SelectContentOverlayManager::CreateHandleLevelSelectOverlay(
SelectOverlayInfo& info, bool animation, HandleLevelMode mode)
{
LOGI("Show SelectOverlay, first %{public}s isShow %{public}d, second %{public}s isShow %{public}d",
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY,
"Show SelectOverlay, first %{public}s isShow %{public}d, second %{public}s isShow %{public}d",
info.firstHandle.paintRect.ToString().c_str(), info.firstHandle.isShow,
info.secondHandle.paintRect.ToString().c_str(), info.secondHandle.isShow);
shareOverlayInfo_ = std::make_shared<SelectOverlayInfo>(info);
@ -530,8 +532,9 @@ void SelectContentOverlayManager::MountNodeToCaller(const RefPtr<FrameNode>& ove
CHECK_NULL_VOID(selectOverlayHolder_);
auto ownerFrameNode = selectOverlayHolder_->GetOwner();
CHECK_NULL_VOID(ownerFrameNode);
LOGI("SelectOverlay: Mount SelectOverlay node to tag: %{public}s, id: %{public}d",
ownerFrameNode->GetTag().c_str(), ownerFrameNode->GetId());
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY,
"Mount SelectOverlay node: %{public}s, id: %{public}d", ownerFrameNode->GetTag().c_str(),
ownerFrameNode->GetId());
ownerFrameNode->SetOverlayNode(overlayNode);
overlayNode->SetParent(AceType::WeakClaim(AceType::RawPtr(ownerFrameNode)));
overlayNode->SetActive(true);
@ -598,7 +601,8 @@ bool SelectContentOverlayManager::CloseInternal(int32_t id, bool animation, Clos
CHECK_NULL_RETURN(selectOverlayHolder_, false);
CHECK_NULL_RETURN(selectOverlayHolder_->GetOwnerId() == id, false);
CHECK_NULL_RETURN(shareOverlayInfo_, false);
LOGI("SelectOverlay: Close selectoverlay by id %{public}d, reason %{public}d", id, reason);
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "Close selectoverlay, id:%{public}d, reason %{public}d",
id, reason);
auto callback = selectOverlayHolder_->GetCallback();
auto menuType = shareOverlayInfo_->menuInfo.menuType;
auto pattern = GetSelectHandlePattern(WeakClaim(this));
@ -654,7 +658,8 @@ void SelectContentOverlayManager::DestroySelectOverlayNode(const RefPtr<FrameNod
overlay->SetParent(nullptr);
}
}
LOGI("SelectOverlay: Remove node [%{public}s, %{public}d] from [%{public}s, %{public}d]", overlay->GetTag().c_str(),
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY,
"Remove node [%{public}s, %{public}d] from [%{public}s, %{public}d]", overlay->GetTag().c_str(),
overlay->GetId(), parentNode->GetTag().c_str(), parentNode->GetId());
parentNode->RemoveChild(overlay);
parentNode->MarkNeedSyncRenderTree();

View File

@ -79,7 +79,7 @@ void SelectOverlayClient::InitSelectOverlay()
void SelectOverlayClient::RequestOpenSelectOverlay(ClientOverlayInfo& showOverlayInfo)
{
LOGI("first handle %{public}d, second handle %{public}d",
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "first handle %{public}d, second handle %{public}d",
showOverlayInfo.firstHandleInfo.has_value(), showOverlayInfo.secondHandleInfo.has_value());
if (SelectOverlayIsOn()) {
UpdateShowingSelectOverlay(showOverlayInfo);
@ -95,8 +95,8 @@ void SelectOverlayClient::CreateSelectOverlay(const ClientOverlayInfo& clientOve
auto overlayInfo = GetSelectOverlayInfo(clientOverlayInfo);
CHECK_NULL_VOID(overlayInfo);
originIsMenuShow_ = overlayInfo->menuInfo.menuIsShow;
LOGI("first handle %{public}d, second handle %{public}d, select rect %{public}d", overlayInfo->firstHandle.isShow,
overlayInfo->secondHandle.isShow, overlayInfo->isSelectRegionVisible);
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "first handle %{public}d, second handle %{public}d, select rect %{public}d",
overlayInfo->firstHandle.isShow, overlayInfo->secondHandle.isShow, overlayInfo->isSelectRegionVisible);
selectOverlayProxy_ = pipeline->GetSelectOverlayManager()->CreateAndShowSelectOverlay(
*overlayInfo, WeakClaim(this), clientOverlayInfo.animation);
if (!overlayInfo->isUsingMouse) {
@ -121,8 +121,7 @@ std::optional<SelectOverlayInfo> SelectOverlayClient::GetSelectOverlayInfo(const
overlayInfo.isSelectRegionVisible = CheckSelectionRectVisible();
overlayInfo.selectArea = clientInfo.selectArea;
overlayInfo.isNewAvoid = clientInfo.isNewAvoid;
overlayInfo.handlerColor =
clientInfo.handlerColor.has_value() ? clientInfo.handlerColor : overlayInfo.handlerColor;
overlayInfo.handlerColor = clientInfo.handlerColor.has_value() ? clientInfo.handlerColor : overlayInfo.handlerColor;
if (!clientInfo.isUpdateMenu) {
return overlayInfo;
}
@ -135,11 +134,11 @@ std::optional<SelectOverlayInfo> SelectOverlayClient::GetSelectOverlayInfo(const
void SelectOverlayClient::UpdateShowingSelectOverlay(ClientOverlayInfo& clientInfo)
{
LOGI("update select overlay");
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "update select overlay");
auto isCurrentSingleHandle = IsShowingSingleHandle();
auto hasRequestSingleHandle = !clientInfo.firstHandleInfo && clientInfo.secondHandleInfo;
if (clientInfo.isShowMouseMenu || (isCurrentSingleHandle ^ hasRequestSingleHandle)) {
LOGI("force close and create new select overlay");
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "force close and create new select overlay");
RequestCloseSelectOverlay(true);
clientInfo.isUpdateMenu = true;
CreateSelectOverlay(clientInfo);
@ -215,7 +214,7 @@ void SelectOverlayClient::UpdateSelectMenuVisibility(bool isVisible)
void SelectOverlayClient::StartListeningScrollableParent(const RefPtr<FrameNode>& host)
{
if (!scrollableParentInfo_.hasParent) {
LOGI("has no scrollable parent");
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "has no scrollable parent");
return;
}
CHECK_NULL_VOID(host);
@ -235,7 +234,7 @@ void SelectOverlayClient::StartListeningScrollableParent(const RefPtr<FrameNode>
parent = parent->GetParent();
}
scrollableParentInfo_.hasParent = !scrollableParentInfo_.parentIds.empty();
LOGI("find scrollable parent %{public}d", scrollableParentInfo_.hasParent);
TAG_LOGI(AceLogTag::ACE_SELECT_OVERLAY, "find scrollable parent %{public}d", scrollableParentInfo_.hasParent);
} else {
for (const auto& scrollId : scrollableParentInfo_.parentIds) {
RegisterParentScrollCallback(scrollId, host->GetId());

View File

@ -196,7 +196,6 @@ void BubblePattern::HandleTouchDown(const Offset& clickPosition)
auto bubbleRenderProp = host->GetPaintProperty<BubbleRenderProperty>();
CHECK_NULL_VOID(bubbleRenderProp);
if (touchRegion_.IsInRegion(PointF(clickPosition.GetX(), clickPosition.GetY()))) {
LOGI("Contains the touch region.");
return;
}
auto autoCancel = bubbleRenderProp->GetAutoCancel().value_or(true);
@ -372,7 +371,6 @@ RefPtr<FrameNode> BubblePattern::GetButtonRowNode()
void BubblePattern::PopBubble()
{
LOGI("BubblePattern::PopBubble from click");
auto pipelineNg = PipelineContext::GetCurrentContext();
CHECK_NULL_VOID(pipelineNg);
auto overlayManager = pipelineNg->GetOverlayManager();

View File

@ -128,7 +128,6 @@ void CalendarPattern::OnModifyDone()
CHECK_NULL_VOID(swiperPattern);
auto currentIndex = swiperPattern->GetCurrentIndex();
currentMonthIndex_ = currentIndex;
LOGI("The current index is %{public}d", currentIndex);
// Set calendat data according to the index.
switch (currentIndex) {
@ -263,7 +262,6 @@ void CalendarPattern::FireRequestData(MonthState monthState)
void CalendarPattern::FireGoToRequestData(int32_t year, int32_t month, int32_t day)
{
LOGI("Jump to date %{public}d-%{public}d-%{public}d.", year, month, day);
auto host = GetHost();
CHECK_NULL_VOID(host);
auto eventHub = GetEventHub<CalendarEventHub>();

View File

@ -151,7 +151,7 @@ RefPtr<FrameNode> ContainerModalView::AddControlButtons(RefPtr<FrameNode>& contr
[wk = WeakClaim(RawPtr(windowManager))](GestureEvent& info) {
auto windowManager = wk.Upgrade();
CHECK_NULL_VOID(windowManager);
LOGI("left split button clicked");
TAG_LOGI(AceLogTag::ACE_APPBAR, "left split button clicked");
windowManager->FireWindowSplitCallBack();
}));
controlButtonsRow->AddChild(BuildControlButton(InternalResource::ResourceId::CONTAINER_MODAL_WINDOW_MAXIMIZE,
@ -160,10 +160,10 @@ RefPtr<FrameNode> ContainerModalView::AddControlButtons(RefPtr<FrameNode>& contr
CHECK_NULL_VOID(windowManager);
auto mode = windowManager->GetWindowMode();
if (mode == WindowMode::WINDOW_MODE_FULLSCREEN) {
LOGI("recover button clicked");
TAG_LOGI(AceLogTag::ACE_APPBAR, "recover button clicked");
windowManager->WindowRecover();
} else {
LOGI("maximize button clicked");
TAG_LOGI(AceLogTag::ACE_APPBAR, "maximize button clicked");
windowManager->WindowMaximize();
}
}));
@ -171,7 +171,7 @@ RefPtr<FrameNode> ContainerModalView::AddControlButtons(RefPtr<FrameNode>& contr
[wk = WeakClaim(RawPtr(windowManager))](GestureEvent& info) {
auto windowManager = wk.Upgrade();
CHECK_NULL_VOID(windowManager);
LOGI("minimize button clicked");
TAG_LOGI(AceLogTag::ACE_APPBAR, "minimize button clicked");
windowManager->WindowMinimize();
}));
controlButtonsRow->AddChild(BuildControlButton(
@ -179,7 +179,7 @@ RefPtr<FrameNode> ContainerModalView::AddControlButtons(RefPtr<FrameNode>& contr
[wk = WeakClaim(RawPtr(windowManager))](GestureEvent& info) {
auto windowManager = wk.Upgrade();
CHECK_NULL_VOID(windowManager);
LOGI("close button clicked");
TAG_LOGI(AceLogTag::ACE_APPBAR, "close button clicked");
windowManager->WindowClose();
},
true));

View File

@ -624,9 +624,9 @@ WeakPtr<FocusHub> GridPattern::GetNextFocusNode(FocusStep step, const WeakPtr<Fo
TAG_LOGW(AceLogTag::ACE_GRID, "Can not find current main index: %{public}d", curMainIndex);
return nullptr;
}
LOGI("GetNextFocusNode: Current focused item is (%{public}d,%{public}d)-[%{public}d,%{public}d]. Focus step is "
"%{public}d",
curMainIndex, curCrossIndex, curMainSpan, curCrossSpan, step);
TAG_LOGI(AceLogTag::ACE_GRID,
"GetNextFocusNode: Current:(%{public}d,%{public}d)-[%{public}d,%{public}d]. Focus: %{public}d", curMainIndex,
curCrossIndex, curMainSpan, curCrossSpan, step);
auto focusSteps = GetFocusSteps(curMainIndex, curCrossIndex, step);
if (focusSteps.first != FocusStep::NONE && focusSteps.second != FocusStep::NONE) {
auto firstStepRes = GetNextFocusNode(focusSteps.first, currentFocusNode);
@ -667,8 +667,6 @@ WeakPtr<FocusHub> GridPattern::GetNextFocusNode(FocusStep step, const WeakPtr<Fo
std::pair<int32_t, int32_t> GridPattern::GetNextIndexByStep(
int32_t curMainIndex, int32_t curCrossIndex, int32_t curMainSpan, int32_t curCrossSpan, FocusStep step)
{
LOGI("Current item: (%{public}d,%{public}d)-[%{public}d,%{public}d]. Grid axis: %{public}d, step: %{public}d",
curMainIndex, curCrossIndex, curMainSpan, curCrossSpan, gridLayoutInfo_.axis_, step);
auto curMainStart = gridLayoutInfo_.startMainLineIndex_;
auto curMainEnd = gridLayoutInfo_.endMainLineIndex_;
auto curChildStartIndex = gridLayoutInfo_.startIndex_;
@ -679,6 +677,9 @@ std::pair<int32_t, int32_t> GridPattern::GetNextIndexByStep(
TAG_LOGW(AceLogTag::ACE_GRID, "Can not find current main index: %{public}d", curMainIndex);
return { -1, -1 };
}
TAG_LOGI(AceLogTag::ACE_GRID,
"Current: (%{public}d,%{public}d)-[%{public}d,%{public}d]. axis: %{public}d, step: %{public}d",
curMainIndex, curCrossIndex, curMainSpan, curCrossSpan, gridLayoutInfo_.axis_, step);
auto curMaxCrossCount = GetCrossCount();
auto nextMainIndex = curMainIndex;
auto nextCrossIndex = curCrossIndex;

View File

@ -58,7 +58,6 @@ RefPtr<FrameNode> LinearIndicatorController::GetProgressNode(int32_t index)
void LinearIndicatorController::InitProgressValue()
{
LOGI("LinearIndicator: Initialize all progress bars.");
int32_t size = GetProgressSize();
int32_t index = animationData_.Index();
for (int32_t i = 0; i < size; ++i) {
@ -92,7 +91,6 @@ void LinearIndicatorController::SetProgressValue(float value)
SetValueAndCallback(value, false);
return;
}
LOGE("LinearIndicator: Failed to set progress.");
StopAnimation(LinearIndicatorControllerDataState::ANIMATION_PAUSE);
animationData_.SetIndexAndValue(0, .0f);
StartProgressAnimation();
@ -100,7 +98,6 @@ void LinearIndicatorController::SetProgressValue(float value)
void LinearIndicatorController::ProgreAnimationStart()
{
LOGI("LinearIndicator: Callback for the start of the animation.");
if (animationData_.Index() == 0) {
InitProgressValue();
}
@ -108,7 +105,6 @@ void LinearIndicatorController::ProgreAnimationStart()
void LinearIndicatorController::StartProgressInterval(int32_t intervalTime)
{
LOGI("LinearIndicator: Start the interval task.");
auto host = GetHost();
CHECK_NULL_VOID(host);
auto context = host->GetContext();
@ -120,7 +116,6 @@ void LinearIndicatorController::StartProgressInterval(int32_t intervalTime)
animationData_.ProgressInterval().Reset([weak] {
auto control = weak.Upgrade();
CHECK_NULL_VOID(control);
LOGI("LinearIndicator: Interval task execution completed.");
control->StartProgressAnimation();
});
taskExecutor->PostDelayedTask(
@ -138,7 +133,6 @@ void LinearIndicatorController::ProgreAnimationEnd()
if (!animationData_.IsRuning()) {
return;
}
LOGI("LinearIndicator: Callback at the end of the animation.");
int32_t index = animationData_.UpdateIndex();
int32_t progressSize = GetProgressSize();
if (progressSize == 0) {
@ -161,7 +155,6 @@ void LinearIndicatorController::StartProgressAnimation()
if (animationData_.IsProgressAnimation()) {
return;
}
LOGI("LinearIndicator: Start an animation session.");
auto host = GetHost();
CHECK_NULL_VOID(host);
auto weak = AceType::WeakClaim(this);
@ -243,15 +236,12 @@ void LinearIndicatorController::Start(int32_t animationTime, int32_t intervalTim
intervalTime = 0;
}
if (animationData_.IsRuning()) {
LOGI("LinearIndicator: Update the time of the running animation.");
PlayingUpdateTime(animationTime, intervalTime);
} else if (animationData_.IsPause()) {
LOGI("LinearIndicator: Pause state starts the animation.");
if (animationData_.State() == LinearIndicatorControllerDataState::INTERVAL_PAUSE) {
animationData_.SetTime(animationTime, intervalTime);
int32_t consumeTime = animationData_.IntervalConsumeTime();
if (consumeTime >= intervalTime) {
LOGI("LinearIndicator: Interval task execution completes, starts progress bar animation.");
StartProgressAnimation();
} else {
StartProgressInterval(intervalTime - consumeTime);
@ -262,7 +252,6 @@ void LinearIndicatorController::Start(int32_t animationTime, int32_t intervalTim
StartProgressAnimation();
}
} else {
LOGI("LinearIndicator: Start animation.");
animationData_.SetTime(animationTime, intervalTime);
StartProgressAnimation();
}
@ -273,7 +262,6 @@ void LinearIndicatorController::Pause()
if (!animationData_.IsRuning()) {
return;
}
LOGI("LinearIndicator: Pause the animation.");
if (animationData_.State() == LinearIndicatorControllerDataState::INTERVAL) {
animationData_.SetState(LinearIndicatorControllerDataState::INTERVAL_PAUSE);
animationData_.ProgressInterval().Cancel();
@ -284,7 +272,6 @@ void LinearIndicatorController::Pause()
void LinearIndicatorController::Stop()
{
LOGI("LinearIndicator: Stop the animation.");
if (animationData_.IsRuning()) {
if (animationData_.State() == LinearIndicatorControllerDataState::INTERVAL) {
animationData_.ProgressInterval().Cancel();
@ -309,15 +296,12 @@ void LinearIndicatorController::SetProgress(int32_t index, float value)
int32_t progressSize = GetProgressSize();
if (progressSize == 0) {
animationData_.InitData();
LOGE("LinearIndicator: The number of progress bars is 0.");
return;
}
if (index < 0 || index >= progressSize) {
LOGE("LinearIndicator: The index value is incorrect.");
return;
}
if (value < 0 || value > END_VALUE) {
LOGE("LinearIndicator: The progress value is incorrect.");
return;
}
if (changeCallback_) {
@ -326,7 +310,6 @@ void LinearIndicatorController::SetProgress(int32_t index, float value)
bool isRuning = animationData_.IsRuning();
bool isPause = animationData_.IsPause();
if (isRuning) {
LOGI("LinearIndicator: Animation to cancel.");
if (animationData_.State() == LinearIndicatorControllerDataState::INTERVAL) {
animationData_.ProgressInterval().Cancel();
} else {
@ -336,7 +319,6 @@ void LinearIndicatorController::SetProgress(int32_t index, float value)
animationData_.SetIndexAndValue(index, value);
InitProgressValue();
if (isRuning) {
LOGI("LinearIndicator: Restart the animation.");
StartProgressAnimation();
} else if (isPause) {
animationData_.SetState(LinearIndicatorControllerDataState::ANIMATION_PAUSE);

View File

@ -653,11 +653,9 @@ void MenuItemPattern::OnClick()
auto selectedChangeEvent = hub->GetSelectedChangeEvent();
SetChange();
if (selectedChangeEvent) {
LOGI("trigger onChangeEvent");
selectedChangeEvent(IsSelected());
}
if (onChange) {
LOGI("trigger onChange");
onChange(IsSelected());
RecordChangeEvent();
}
@ -926,8 +924,6 @@ void MenuItemPattern::AddHoverRegions(const OffsetF& topLeftPoint, const OffsetF
TouchRegion hoverRegion = TouchRegion(
Offset(topLeftPoint.GetX(), topLeftPoint.GetY()), Offset(bottomRightPoint.GetX(), bottomRightPoint.GetY()));
hoverRegions_.emplace_back(hoverRegion);
LOGI("MenuItemPattern::AddHoverRegions hoverRegion is %{public}s to %{public}s", topLeftPoint.ToString().c_str(),
bottomRightPoint.ToString().c_str());
}
bool MenuItemPattern::IsInHoverRegions(double x, double y)

View File

@ -202,7 +202,6 @@ void MenuWrapperPattern::HandleMouseEvent(const MouseInfo& info, RefPtr<MenuItem
const auto& mousePosition = info.GetGlobalLocation();
if (!menuItemPattern->IsInHoverRegions(mousePosition.GetX(), mousePosition.GetY()) &&
menuItemPattern->IsSubMenuShowed()) {
LOGI("MenuWrapperPattern Hide SubMenu");
HideSubMenu();
menuItemPattern->SetIsSubMenuShowed(false);
menuItemPattern->ClearHoverRegions();

View File

@ -98,12 +98,10 @@ void OptionPattern::OnSelectProcess()
CHECK_NULL_VOID(hub);
auto JsAction = hub->GetJsCallback();
if (JsAction) {
LOGI("Option's callback executing");
JsAction();
}
auto onSelect = hub->GetOnSelect();
if (onSelect) {
LOGI("selecting option %d", index_);
onSelect(index_);
}
host->OnAccessibilityEvent(AccessibilityEventType::SELECTED);

View File

@ -138,7 +138,6 @@ void SecurityComponentPattern::HandleClickEventFromTouch(const TouchEventInfo& i
gestureInfo.SetPointerEvent(info.GetPointerEvent());
int res = ReportSecurityComponentClickEvent(gestureInfo);
if (res == Security::SecurityComponent::SC_SERVICE_ERROR_WAIT_FOR_DIALOG_CLOSE) {
LOGI("wait for dialog, drop current click");
return;
}
if (res != 0) {
@ -214,7 +213,6 @@ void SecurityComponentPattern::InitOnClick(RefPtr<FrameNode>& secCompNode, RefPt
} else {
res = buttonPattern->ReportSecurityComponentClickEvent(info);
if (res == Security::SecurityComponent::SC_SERVICE_ERROR_WAIT_FOR_DIALOG_CLOSE) {
LOGI("wait for dialog, drop current click");
res = static_cast<int32_t>(SecurityComponentHandleResult::DROP_CLICK);
} else if (res != 0) {
LOGW("ReportSecurityComponentClickEvent failed, errno %{public}d", res);
@ -493,7 +491,6 @@ void SecurityComponentPattern::RegisterSecurityComponentRetry()
while (retryCount > 0) {
int32_t res = SecurityComponentHandler::RegisterSecurityComponent(frameNode, scId_);
if (res == Security::SecurityComponent::SCErrCode::SC_OK) {
LOGI("Register security component success.");
regStatus_ = SecurityComponentRegisterStatus::REGISTERED;
return;
} else if (res != Security::SecurityComponent::SCErrCode::SC_SERVICE_ERROR_SERVICE_NOT_EXIST) {
@ -513,7 +510,6 @@ void SecurityComponentPattern::RegisterSecurityComponent()
{
if (regStatus_ == SecurityComponentRegisterStatus::REGISTERED ||
regStatus_ == SecurityComponentRegisterStatus::REGISTERING) {
LOGI("Register security component has registered or is registering");
return;
}
@ -542,7 +538,6 @@ void SecurityComponentPattern::RegisterSecurityComponent()
auto pattern = weak.Upgrade();
CHECK_NULL_VOID(pattern);
if (pattern->regStatus_ != SecurityComponentRegisterStatus::REGISTERING) {
LOGI("Register security component ASync droped.");
return;
}
@ -590,7 +585,6 @@ int32_t SecurityComponentPattern::ReportSecurityComponentClickEvent(GestureEvent
auto frameNode = GetHost();
CHECK_NULL_RETURN(frameNode, -1);
if (regStatus_ == SecurityComponentRegisterStatus::REGISTERING) {
LOGI("ClickEventHandler: security component is registering.");
RegisterSecurityComponentRetry();
}
if (regStatus_ != SecurityComponentRegisterStatus::REGISTERED) {
@ -635,7 +629,6 @@ int32_t SecurityComponentPattern::ReportSecurityComponentClickEvent(const KeyEve
auto frameNode = GetHost();
CHECK_NULL_RETURN(frameNode, -1);
if (regStatus_ == SecurityComponentRegisterStatus::REGISTERING) {
LOGI("KeyEventHandler: security component is registering.");
RegisterSecurityComponentRetry();
}
if (regStatus_ != SecurityComponentRegisterStatus::REGISTERED) {

View File

@ -268,7 +268,6 @@ bool StageManager::PushPage(const RefPtr<FrameNode>& node, bool needHideLast, bo
// flush layout task.
if (!stageNode_->GetGeometryNode()->GetMarginFrameSize().IsPositive()) {
// in first load case, wait for window size.
LOGI("waiting for window size");
return true;
}
stageNode_->MarkDirtyNode(PROPERTY_UPDATE_MEASURE);

View File

@ -200,7 +200,7 @@ void PasswordResponseArea::AddEvent(const RefPtr<FrameNode>& node)
button->OnPasswordIconClicked();
};
auto longPressCallback = [](GestureEvent& info) {
LOGI("PasswordResponseArea long press");
LOGD("PasswordResponseArea long press");
};
auto mouseTask = [id = Container::CurrentId(), weak = hostPattern_](MouseInfo& info) {
info.SetStopPropagation(true);

View File

@ -144,7 +144,7 @@ void UIExtensionModelNG::Create(const UIExtensionConfig& config)
void UIExtensionModelNG::CreateSecurityUIExtension(const UIExtensionConfig& config)
{
LOGI("CreateSecurityUIExtension");
TAG_LOGI(AceLogTag::ACE_SECURITYUIEXTENSION, "CreateSecurityUIExtension");
auto* stack = ViewStackProcessor::GetInstance();
auto nodeId = stack->ClaimNodeId();
auto frameNode = FrameNode::GetOrCreateFrameNode(V2::UI_EXTENSION_COMPONENT_ETS_TAG, nodeId,

View File

@ -897,7 +897,6 @@ void VideoPattern::RegisterRenderContextCallBack()
renderSurfaceWeakPtr_ = renderSurface_;
renderContextForMediaPlayerWeakPtr_ = renderContextForMediaPlayer_;
auto OnAttachCallBack = [weak = WeakClaim(this)](int64_t textureId, bool isAttach) mutable {
LOGI("OnAttachCallBack.");
auto videoPattern = weak.Upgrade();
CHECK_NULL_VOID(videoPattern);
if (auto renderSurface = videoPattern->renderSurfaceWeakPtr_.Upgrade(); renderSurface) {

View File

@ -50,8 +50,6 @@ std::optional<float> ConvertToPx(const CalcLength& value, const ScaleProperty& s
double result = -1.0;
if (!value.NormalizeToPx(
scaleProperty.vpScale, scaleProperty.fpScale, scaleProperty.lpxScale, percentReference, result)) {
LOGE("fail to Convert CalcDimension To Px: %{public}f, %{public}f, %{public}f, %{public}f",
scaleProperty.vpScale, scaleProperty.fpScale, scaleProperty.lpxScale, percentReference);
return std::nullopt;
}
return static_cast<float>(result);
@ -66,8 +64,6 @@ std::optional<float> ConvertToPx(
double result = -1.0;
if (!value.value().NormalizeToPx(
scaleProperty.vpScale, scaleProperty.fpScale, scaleProperty.lpxScale, percentReference, result)) {
LOGE("optional: fail to Convert CalcDimension To Px: %{public}f, %{public}f, %{public}f, %{public}f",
scaleProperty.vpScale, scaleProperty.fpScale, scaleProperty.lpxScale, percentReference);
return std::nullopt;
}
return static_cast<float>(result);
@ -78,8 +74,6 @@ std::optional<float> ConvertToPx(const Dimension& dimension, const ScaleProperty
double result = -1.0;
if (!dimension.NormalizeToPx(
scaleProperty.vpScale, scaleProperty.fpScale, scaleProperty.lpxScale, percentReference, result)) {
LOGE("fail to Convert dimension To Px: %{public}f, %{public}f, %{public}f, %{public}f", scaleProperty.vpScale,
scaleProperty.fpScale, scaleProperty.lpxScale, percentReference);
return std::nullopt;
}
return static_cast<float>(result);
@ -94,8 +88,6 @@ std::optional<float> ConvertToPx(
double result = -1.0;
if (!dimension.value().NormalizeToPx(
scaleProperty.vpScale, scaleProperty.fpScale, scaleProperty.lpxScale, percentReference, result)) {
LOGE("fail to Convert dimension To Px: %{public}f, %{public}f, %{public}f, %{public}f", scaleProperty.vpScale,
scaleProperty.fpScale, scaleProperty.lpxScale, percentReference);
return std::nullopt;
}
return static_cast<float>(result);

View File

@ -269,12 +269,9 @@ void RosenRenderSurface::DrawBuffer(int32_t width, int32_t height)
}
}
if (!surfaceNode) {
LOGE("RosenRenderSurface::surfaceNode is null");
return;
}
if (!CompareBufferSize(width, height, surfaceNode)) {
LOGE("RosenRenderSurface buffer is not matched.");
}
CompareBufferSize(width, height, surfaceNode);
ACE_SCOPED_TRACE("Web DrawBuffer");
rosenRenderContext->StartRecording();
auto rsNode = rosenRenderContext->GetRSNode();
@ -363,8 +360,6 @@ void RosenRenderSurface::ConsumeWebBuffer()
int32_t stepStear = bufferWidth - ADJUST_WEB_DRAW_LENGTH * 2;
orgin_.SetX(stepStear * ADJUST_WEB_DRAW_LENGTH);
}
} else {
LOGE("ConsumeWebBuffer axis is not vertical or horizontal");
}
LOGD("ConsumeWebBuffer x : %{public}f, y : %{public}f, width : %{public}d, height : %{public}d",
orgin_.GetX(), orgin_.GetY(), bufferWidth, bufferHeight);

View File

@ -154,10 +154,10 @@ void LayeredDrawableDescriptor::InitialResource(const std::shared_ptr<Global::Re
InitialMask(resourceMgr);
// preprocess get background and foreground
if (!PreGetPixelMapFromJsonBuf(resourceMgr, true)) {
HILOGE("Create background Item imageSource from json buffer failed");
HILOGD("Create background Item imageSource from json buffer failed");
}
if (!PreGetPixelMapFromJsonBuf(resourceMgr, false)) {
HILOGE("Create foreground Item imageSource from json buffer failed");
HILOGD("Create foreground Item imageSource from json buffer failed");
}
}

View File

@ -484,9 +484,7 @@ napi_value ParseCurve(napi_env env, napi_value value, std::string& curveTypeStri
curve = Framework::CreateCurve(params);
}
std::string curveString = curve->ToString();
LOGI("curveString %{public}s", curveString.c_str());
ParseCurveInfo(curveString, curveTypeString, curveValue);
LOGI("curveTypeString %{public}s", curveTypeString.c_str());
return nullptr;
}