TicketNO: DTS2024101710167

Description: 添加了关键处的日志信息,比如formData.size,并修复了组建日志中多处打印指针的问题
Team:
Feature or Bugfix:
Binary source:
PrivateCode(Yes/No):No
Signed-off-by: y30069754 <335776680@qq.com>
This commit is contained in:
Yangdingcheng 2024-10-29 20:31:43 +08:00
parent e9cd91cb88
commit 711140fe58
3 changed files with 26 additions and 12 deletions

View File

@ -836,8 +836,11 @@ void UIContentImpl::PreInitializeForm(OHOS::Rosen::Window* window, const std::st
void UIContentImpl::RunFormPage()
{
LOGI("[%{public}s][%{public}s][%{public}d]: Initialize startUrl: %{public}s, formData_.size:%{public}s",
bundleName_.c_str(), moduleName_.c_str(), instanceId_, startUrl_.c_str(), std::to_string(formData_.size()).c_str());
LOGI("[%{public}s][%{public}s][%{public}d]: Initialize startUrl: %{public}s, \
formData_.size:%{public}s",
bundleName_.c_str(), moduleName_.c_str(),
instanceId_, startUrl_.c_str(),
std::to_string(formData_.size()).c_str());
// run page.
Platform::AceContainer::RunPage(instanceId_, startUrl_, formData_, false);
auto distributedUI = std::make_shared<NG::DistributedUI>();

View File

@ -51,8 +51,11 @@ FormRenderer::~FormRenderer()
void FormRenderer::PreInitUIContent(const OHOS::AAFwk::Want& want, const OHOS::AppExecFwk::FormJsInfo& formJsInfo)
{
HILOG_INFO("InitUIContent width = %{public}f , height = %{public}f, borderWidth = %{public}f. formJsInfo.formData.size = %{public}s. formJsInfo.imageDataMap.size = %{public}zu.",
width_, height_, borderWidth_, std::to_string(formJsInfo.formData.size()).c_str(), formJsInfo.imageDataMap.size());
HILOG_INFO("InitUIContent width = %{public}f , height = %{public}f, borderWidth = %{public}f. \
formJsInfo.formData.size = %{public}s. formJsInfo.imageDataMap.size = %{public}zu.",
width_, height_, borderWidth_,
std::to_string(formJsInfo.formData.size()).c_str(),
formJsInfo.imageDataMap.size());
SetAllowUpdate(allowUpdate_);
uiContent_->SetFormWidth(width_ - borderWidth_ * DOUBLE);
uiContent_->SetFormHeight(height_ - borderWidth_ * DOUBLE);
@ -227,8 +230,10 @@ void FormRenderer::UpdateForm(const OHOS::AppExecFwk::FormJsInfo& formJsInfo)
uiContent_->SetFontScaleFollowSystem(fontScaleFollowSystem_);
uiContent_->UpdateFormSharedImage(formJsInfo.imageDataMap);
uiContent_->UpdateFormData(formJsInfo.formData);
HILOG_INFO("FormRender UpdateForm end. formJsInfo.formData.size = %{public}s. formJsInfo.imageDataMap.size = %{public}zu.",
std::to_string(formJsInfo.formData.size()).c_str(), formJsInfo.imageDataMap.size());
HILOG_INFO("FormRender UpdateForm end. formJsInfo.formData.size = %{public}s. \
formJsInfo.imageDataMap.size = %{public}zu.",
std::to_string(formJsInfo.formData.size()).c_str(),
formJsInfo.imageDataMap.size());
}
void FormRenderer::Destroy()

View File

@ -125,18 +125,24 @@ void FormRendererGroup::InnerAddForm(const FormRequest& formRequest)
HILOG_ERROR("InnerAddForm create form render failed");
return;
}
HILOG_INFO("InnerAddForm compId is %{public}s. formId is %{public}s, formJsInfo.formData.size is %{public}s", compId.c_str(),
std::to_string(formJsInfo.formId).c_str(), std::to_string(formJsInfo.formData.size()).c_str());
HILOG_INFO("InnerAddForm compId is %{public}s. formId is %{public}s, formJsInfo.formData.size is %{public}s",
compId.c_str(),
std::to_string(formJsInfo.formId).c_str(),
std::to_string(formJsInfo.formData.size()).c_str());
formRenderer_->AddForm(want, formJsInfo);
initState_ = FormRendererInitState::INITIALIZED;
} else if (initState_ == FormRendererInitState::PRE_INITIALIZED) {
HILOG_INFO("RunFormPage compId is %{public}s. formId is %{public}s, formJsInfo.formData.size is %{public}s", compId.c_str(),
std::to_string(formJsInfo.formId).c_str(), std::to_string(formJsInfo.formData.size()).c_str());
HILOG_INFO("RunFormPage compId is %{public}s. formId is %{public}s, formJsInfo.formData.size is %{public}s",
compId.c_str(),
std::to_string(formJsInfo.formId).c_str(),
std::to_string(formJsInfo.formData.size()).c_str());
formRenderer_->RunFormPage(want, formJsInfo);
initState_ = FormRendererInitState::INITIALIZED;
} else { // initState_ == FormRendererInitState::INITIALIZED
HILOG_INFO("AttachForm compId is %{public}s formRequests size is :%{public}s. formJsInfo.formData.size is %{public}s",
compId.c_str(), std::to_string(formRequests_.size()).c_str(), std::to_string(formJsInfo.formData.size()).c_str());
HILOG_INFO("AttachForm compId is %{public}s formRequests size is %{public}s. formJsInfo.formData.size is %{public}s",
compId.c_str(),
std::to_string(formRequests_.size()).c_str(),
std::to_string(formJsInfo.formData.size()).c_str());
formRenderer_->AttachForm(want, formJsInfo);
}
}