【mediaQuery】添加维测日志

Signed-off-by: fengjituo111 <fengjituo@huawei.com>
Change-Id: Icc0c6e0c95aa4cd0282a037ad101839a34729e93
This commit is contained in:
fengjituo111 2024-09-04 03:07:14 +00:00
parent a31f0780ff
commit db2fad4310
3 changed files with 9 additions and 0 deletions

View File

@ -126,6 +126,7 @@ const std::unordered_map<AceLogTag, const char*> g_DOMAIN_CONTENTS_MAP = {
{ AceLogTag::ACE_CLIPBOARD, "AceClipBoard"},
{ AceLogTag::ACE_SECURITY_COMPONENT, "AceSecurityComponent"},
{ AceLogTag::ACE_LAYOUT_INSPECTOR, "AceLayoutInspector" },
{ AceLogTag::ACE_MEDIA_QUERY, "AceMediaQuery" },
};
// initial static member object
LogLevel LogWrapper::level_ = LogLevel::DEBUG;

View File

@ -203,6 +203,7 @@ enum AceLogTag : uint8_t {
ACE_VISUAL_EFFECT, // C03955
ACE_SECURITY_COMPONENT, // C03956
ACE_LAYOUT_INSPECTOR, // C03957
ACE_MEDIA_QUERY, // C03958
FORM_RENDER = 255, // C039FF FormRenderer, last domain, do not add
};

View File

@ -68,6 +68,7 @@ public:
{
{
std::lock_guard<std::mutex> lock(mutex_);
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "clean:%{public}s", media_.c_str());
CleanListenerSet();
}
@ -132,6 +133,8 @@ public:
if (delayDeleteCallbacks_->find(cbRef) != delayDeleteCallbacks_->end()) {
continue;
}
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "trigger:%{public}s matches:%{public}d",
listener->media_.c_str(), listener->matches_);
napi_handle_scope scope = nullptr;
napi_open_handle_scope(listener->env_, &scope);
if (scope == nullptr) {
@ -182,6 +185,8 @@ public:
napi_ref ref = nullptr;
napi_create_reference(env, cb, 1, &ref);
listener->cbList_.emplace_back(ref);
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "on:%{public}s num=%{public}d", listener->media_.c_str(),
static_cast<int>(listener->cbList_.size()));
napi_close_handle_scope(env, scope);
#if defined(PREVIEW)
@ -225,6 +230,8 @@ public:
}
listener->cbList_.erase(iter);
}
TAG_LOGI(AceLogTag::ACE_MEDIA_QUERY, "off:%{public}s num=%{public}d", listener->media_.c_str(),
static_cast<int>(listener->cbList_.size()));
return nullptr;
}