diff --git a/dm/src/display_manager.cpp b/dm/src/display_manager.cpp index 2ad59502..b1a79c8f 100644 --- a/dm/src/display_manager.cpp +++ b/dm/src/display_manager.cpp @@ -26,7 +26,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManager"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManager"}; } WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManager) @@ -358,7 +358,6 @@ void DisplayManager::NotifyDisplayStateChanged(DisplayState state) std::lock_guard lock(pImpl_->mutex_); if (pImpl_->displayStateCallback_) { pImpl_->displayStateCallback_(state); - WLOGFW("displayStateCallback_ end"); pImpl_->ClearDisplayStateCallback(); return; } diff --git a/dm/src/display_manager_adapter.cpp b/dm/src/display_manager_adapter.cpp index 6e000002..9eae9ea7 100644 --- a/dm/src/display_manager_adapter.cpp +++ b/dm/src/display_manager_adapter.cpp @@ -23,7 +23,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerAdapter"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAdapter"}; } WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerAdapter) diff --git a/dm/src/screen_manager.cpp b/dm/src/screen_manager.cpp index 60c5c357..bd611f52 100644 --- a/dm/src/screen_manager.cpp +++ b/dm/src/screen_manager.cpp @@ -23,7 +23,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "ScreenManager"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManager"}; } class ScreenManager::Impl : public RefBase { public: diff --git a/dm/src/zidl/display_manager_agent_proxy.cpp b/dm/src/zidl/display_manager_agent_proxy.cpp index d75de9dc..6d53e875 100644 --- a/dm/src/zidl/display_manager_agent_proxy.cpp +++ b/dm/src/zidl/display_manager_agent_proxy.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerAgentProxy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentProxy"}; } void DisplayManagerAgentProxy::NotifyDisplayPowerEvent(DisplayPowerEvent event, EventStatus status) diff --git a/dm/src/zidl/display_manager_agent_stub.cpp b/dm/src/zidl/display_manager_agent_stub.cpp index 5db85fcf..97a3453f 100644 --- a/dm/src/zidl/display_manager_agent_stub.cpp +++ b/dm/src/zidl/display_manager_agent_stub.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerAgentStub"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentStub"}; } int32_t DisplayManagerAgentStub::OnRemoteRequest(uint32_t code, MessageParcel& data, diff --git a/dm/test/systemtest/display_power_test.cpp b/dm/test/systemtest/display_power_test.cpp index 34f761bb..a3fdc252 100644 --- a/dm/test/systemtest/display_power_test.cpp +++ b/dm/test/systemtest/display_power_test.cpp @@ -23,7 +23,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayPowerTest"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayPowerTest"}; constexpr uint32_t MAX_TIME_WAITING_FOR_CALLBACK = 40; constexpr uint32_t SLEEP_TIME_IN_US = 50000; } diff --git a/dm/test/systemtest/display_test_utils.cpp b/dm/test/systemtest/display_test_utils.cpp index da8dd8ca..92709c18 100644 --- a/dm/test/systemtest/display_test_utils.cpp +++ b/dm/test/systemtest/display_test_utils.cpp @@ -18,7 +18,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayTestUtils"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayTestUtils"}; } DisplayTestUtils::~DisplayTestUtils() diff --git a/dm/test/systemtest/screenshot_cmd_test.cpp b/dm/test/systemtest/screenshot_cmd_test.cpp index 9a7d7079..8031aa09 100644 --- a/dm/test/systemtest/screenshot_cmd_test.cpp +++ b/dm/test/systemtest/screenshot_cmd_test.cpp @@ -25,7 +25,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "ScreenshotCmdTest"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenshotCmdTest"}; } using utils = DisplayTestUtils; class ScreenshotCmdTest : public testing::Test { diff --git a/dm/test/systemtest/screenshot_test.cpp b/dm/test/systemtest/screenshot_test.cpp index 8b224836..fa80c3a7 100644 --- a/dm/test/systemtest/screenshot_test.cpp +++ b/dm/test/systemtest/screenshot_test.cpp @@ -24,7 +24,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "ScreenshotTest"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenshotTest"}; } using utils = DisplayTestUtils; class ScreenshotTest : public testing::Test { diff --git a/dm/test/unittest/screen_manager_utils.cpp b/dm/test/unittest/screen_manager_utils.cpp index 23095232..7fb736b2 100644 --- a/dm/test/unittest/screen_manager_utils.cpp +++ b/dm/test/unittest/screen_manager_utils.cpp @@ -18,7 +18,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "ScreenManagerUtils"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManagerUtils"}; } bool ScreenManagerUtils::CreateSurface() diff --git a/dmserver/src/abstract_display.cpp b/dmserver/src/abstract_display.cpp index 09513536..30929651 100644 --- a/dmserver/src/abstract_display.cpp +++ b/dmserver/src/abstract_display.cpp @@ -21,7 +21,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "AbstractDisplay"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractDisplay"}; } AbstractDisplay::AbstractDisplay(const DisplayInfo& info) diff --git a/dmserver/src/abstract_display_controller.cpp b/dmserver/src/abstract_display_controller.cpp index 09b367e0..ccdc90a2 100644 --- a/dmserver/src/abstract_display_controller.cpp +++ b/dmserver/src/abstract_display_controller.cpp @@ -25,7 +25,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "AbstractDisplayController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractDisplayController"}; } AbstractDisplayController::AbstractDisplayController(std::recursive_mutex& mutex) diff --git a/dmserver/src/abstract_screen.cpp b/dmserver/src/abstract_screen.cpp index a082d1d2..1efeb13e 100644 --- a/dmserver/src/abstract_screen.cpp +++ b/dmserver/src/abstract_screen.cpp @@ -21,7 +21,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "AbstractScreenGroup"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractScreenGroup"}; } AbstractScreen::AbstractScreen(ScreenId dmsId, ScreenId rsId) diff --git a/dmserver/src/abstract_screen_controller.cpp b/dmserver/src/abstract_screen_controller.cpp index 32186a94..58bd8593 100644 --- a/dmserver/src/abstract_screen_controller.cpp +++ b/dmserver/src/abstract_screen_controller.cpp @@ -26,7 +26,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "AbstractScreenController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractScreenController"}; } AbstractScreenController::AbstractScreenController(std::recursive_mutex& mutex) diff --git a/dmserver/src/display_manager_agent_controller.cpp b/dmserver/src/display_manager_agent_controller.cpp index 92f30d63..5ea712b5 100644 --- a/dmserver/src/display_manager_agent_controller.cpp +++ b/dmserver/src/display_manager_agent_controller.cpp @@ -19,7 +19,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerAgentController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentController"}; } WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerAgentController) diff --git a/dmserver/src/display_manager_proxy.cpp b/dmserver/src/display_manager_proxy.cpp index 3f7be109..48cfcf4a 100644 --- a/dmserver/src/display_manager_proxy.cpp +++ b/dmserver/src/display_manager_proxy.cpp @@ -24,7 +24,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerProxy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerProxy"}; } DisplayId DisplayManagerProxy::GetDefaultDisplayId() diff --git a/dmserver/src/display_manager_service.cpp b/dmserver/src/display_manager_service.cpp index 0f2c827f..b918255e 100644 --- a/dmserver/src/display_manager_service.cpp +++ b/dmserver/src/display_manager_service.cpp @@ -27,7 +27,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerService"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerService"}; } WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerService) const bool REGISTER_RESULT = SystemAbility::MakeAndRegisterAbility(&SingletonContainer::Get()); diff --git a/dmserver/src/display_manager_service_inner.cpp b/dmserver/src/display_manager_service_inner.cpp index 3e3f76ca..a4f60e29 100644 --- a/dmserver/src/display_manager_service_inner.cpp +++ b/dmserver/src/display_manager_service_inner.cpp @@ -28,7 +28,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerServiceInner"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerServiceInner"}; } WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerServiceInner) diff --git a/dmserver/src/display_manager_stub.cpp b/dmserver/src/display_manager_stub.cpp index 189027a5..11f18b1c 100644 --- a/dmserver/src/display_manager_stub.cpp +++ b/dmserver/src/display_manager_stub.cpp @@ -25,7 +25,7 @@ namespace OHOS::Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayManagerStub"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerStub"}; } int32_t DisplayManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/dmserver/src/display_power_controller.cpp b/dmserver/src/display_power_controller.cpp index 8de8b397..d5c7f9e0 100644 --- a/dmserver/src/display_power_controller.cpp +++ b/dmserver/src/display_power_controller.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "DisplayPowerController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayPowerController"}; } bool DisplayPowerController::SuspendBegin(PowerStateChangeReason reason) diff --git a/interfaces/kits/napi/common/wm_napi_common.h b/interfaces/kits/napi/common/wm_napi_common.h index f80accb8..6b8cabac 100644 --- a/interfaces/kits/napi/common/wm_napi_common.h +++ b/interfaces/kits/napi/common/wm_napi_common.h @@ -24,8 +24,10 @@ #include #include #include "wm_common.h" +#include "window_manager_hilog.h" -constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, 0, "NapiWindowManagerCommonLayer" }; +constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, OHOS::Rosen::HILOG_DOMAIN_WINDOW, + "NapiWindowManagerCommonLayer" }; #define GNAPI_LOG(fmt, ...) OHOS::HiviewDFX::HiLog::Info(LABEL, \ "%{public}s:%{public}d " fmt, __func__, __LINE__, ##__VA_ARGS__) diff --git a/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp b/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp index 4e276ba0..fbedff60 100644 --- a/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp +++ b/interfaces/kits/napi/window_runtime/window_manager_napi/js_window_manager.cpp @@ -29,7 +29,7 @@ namespace OHOS { namespace Rosen { using namespace AbilityRuntime; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsWindowManager"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindowManager"}; } class JsWindowManager { diff --git a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp index 220b7c29..1476e7a0 100644 --- a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp +++ b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { using namespace AbilityRuntime; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsWindow"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindow"}; constexpr Rect EMPTY_RECT = {0, 0, 0, 0}; } diff --git a/interfaces/kits/napi/window_runtime/window_napi/js_window_listener.cpp b/interfaces/kits/napi/window_runtime/window_napi/js_window_listener.cpp index a5a89141..0ceab690 100644 --- a/interfaces/kits/napi/window_runtime/window_napi/js_window_listener.cpp +++ b/interfaces/kits/napi/window_runtime/window_napi/js_window_listener.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { using namespace AbilityRuntime; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsWindowListener"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindowListener"}; } constexpr uint32_t AVOID_AREA_NUM = 4; diff --git a/interfaces/kits/napi/window_runtime/window_napi/js_window_utils.cpp b/interfaces/kits/napi/window_runtime/window_napi/js_window_utils.cpp index bd0ac812..abe925e6 100644 --- a/interfaces/kits/napi/window_runtime/window_napi/js_window_utils.cpp +++ b/interfaces/kits/napi/window_runtime/window_napi/js_window_utils.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Rosen { using namespace AbilityRuntime; namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsWindowUtils"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindowUtils"}; } NativeValue* GetRectAndConvertToJsValue(NativeEngine& engine, const Rect rect) diff --git a/interfaces/kits/napi/window_runtime/window_stage_napi/js_window_stage.cpp b/interfaces/kits/napi/window_runtime/window_stage_napi/js_window_stage.cpp index 029c89d7..8ab1a7ef 100644 --- a/interfaces/kits/napi/window_runtime/window_stage_napi/js_window_stage.cpp +++ b/interfaces/kits/napi/window_runtime/window_stage_napi/js_window_stage.cpp @@ -24,7 +24,7 @@ namespace Rosen { using namespace AbilityRuntime; namespace { const int CONTENT_STORAGE_ARG = 2; -constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "JsWindowStage"}; +constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindowStage"}; } // namespace void JsWindowStage::Finalizer(NativeEngine* engine, void* data, void* hint) diff --git a/utils/include/client_agent_container.h b/utils/include/client_agent_container.h index 508fd836..ac53e3b7 100644 --- a/utils/include/client_agent_container.h +++ b/utils/include/client_agent_container.h @@ -38,6 +38,8 @@ private: void RemoveAgent(const sptr& remoteObject); bool UnregisterAgentLocked(std::vector>& agents, const sptr& agent); + static constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "ClientAgentContainer"}; + struct finder_t { finder_t(sptr remoteObject) : remoteObject_(remoteObject) {} @@ -63,9 +65,9 @@ bool ClientAgentContainer::RegisterAgent(const sptr& agent, T2 type) { std::lock_guard lock(mutex_); agentMap_[type].push_back(agent); - WLOG_I("ClientAgentContainer agent registered type:%{public}u", type); + WLOGFI("agent registered type:%{public}u", type); if (deathRecipient_ == nullptr || !agent->AsObject()->AddDeathRecipient(deathRecipient_)) { - WLOG_I("ClientAgentContainer failed to add death recipient"); + WLOGFI("failed to add death recipient"); } return true; } @@ -75,7 +77,7 @@ bool ClientAgentContainer::UnregisterAgent(const sptr& agent, T2 typ { std::lock_guard lock(mutex_); if (agent == nullptr || agentMap_.count(type) == 0) { - WLOG_E("ClientAgentContainer agent or type is invalid"); + WLOGFE("agent or type is invalid"); return false; } auto& agents = agentMap_.at(type); @@ -89,7 +91,7 @@ std::vector> ClientAgentContainer::GetAgentsByType(T2 type) { std::lock_guard lock(mutex_); if (agentMap_.count(type) == 0) { - WLOG_W("ClientAgentContainer no such type of agent registered! type:%{public}u", type); + WLOGFI("no such type of agent registered! type:%{public}u", type); return std::vector>(); } return agentMap_.at(type); @@ -101,18 +103,18 @@ bool ClientAgentContainer::UnregisterAgentLocked(std::vector>& { auto iter = std::find_if(agents.begin(), agents.end(), finder_t(agent)); if (iter == agents.end()) { - WLOG_W("ClientAgentContainer could not find this agent"); + WLOGFW("could not find this agent"); return false; } agents.erase(iter); - WLOG_I("ClientAgentContainer agent unregistered"); + WLOGFI("agent unregistered"); return true; } template void ClientAgentContainer::RemoveAgent(const sptr& remoteObject) { - WLOG_I("ClientAgentContainer RemoveAgent"); + WLOGFI("RemoveAgent"); std::lock_guard lock(mutex_); for (auto& elem : agentMap_) { if (UnregisterAgentLocked(elem.second, remoteObject)) { diff --git a/utils/include/window_manager_hilog.h b/utils/include/window_manager_hilog.h index bf790ce8..9bd08bb0 100644 --- a/utils/include/window_manager_hilog.h +++ b/utils/include/window_manager_hilog.h @@ -19,7 +19,9 @@ #include "hilog/log.h" namespace OHOS { namespace Rosen { -static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = {LOG_CORE, 0, "WindowManager"}; +static constexpr unsigned int HILOG_DOMAIN_WINDOW = 0xD004200; +static constexpr unsigned int HILOG_DOMAIN_DISPLAY = 0xD004201; +static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManager"}; #define WLOG_F(...) (void)OHOS::HiviewDFX::HiLog::Fatal(LOG_LABEL, __VA_ARGS__) #define WLOG_E(...) (void)OHOS::HiviewDFX::HiLog::Error(LOG_LABEL, __VA_ARGS__) diff --git a/utils/src/agent_death_recipient.cpp b/utils/src/agent_death_recipient.cpp index 917c1517..44c48d55 100644 --- a/utils/src/agent_death_recipient.cpp +++ b/utils/src/agent_death_recipient.cpp @@ -19,7 +19,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "AgentDeathRecipient"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "AgentDeathRecipient"}; } void AgentDeathRecipient::OnRemoteDied(const wptr& wptrDeath) diff --git a/utils/src/singleton_container.cpp b/utils/src/singleton_container.cpp index c0194be5..2c008d8f 100644 --- a/utils/src/singleton_container.cpp +++ b/utils/src/singleton_container.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { -constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManager_SingletonContainer"}; +constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "SingletonContainer"}; } // namespace WM_IMPLEMENT_SINGLE_INSTANCE(SingletonContainer) diff --git a/wm/src/input_transfer_station.cpp b/wm/src/input_transfer_station.cpp index 44465b20..d3b7289b 100644 --- a/wm/src/input_transfer_station.cpp +++ b/wm/src/input_transfer_station.cpp @@ -19,7 +19,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "InputTransferStation"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "InputTransferStation"}; } WM_IMPLEMENT_SINGLE_INSTANCE(InputTransferStation) diff --git a/wm/src/vsync_station.cpp b/wm/src/vsync_station.cpp index 20b2bfb5..832d6172 100644 --- a/wm/src/vsync_station.cpp +++ b/wm/src/vsync_station.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "VsyncStation"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "VsyncStation"}; } WM_IMPLEMENT_SINGLE_INSTANCE(VsyncStation) diff --git a/wm/src/window.cpp b/wm/src/window.cpp index a724a839..f1717e90 100644 --- a/wm/src/window.cpp +++ b/wm/src/window.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowImpl"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowImpl"}; } sptr Window::Create(const std::string& windowName, sptr& option, const std::shared_ptr& context) diff --git a/wm/src/window_adapter.cpp b/wm/src/window_adapter.cpp index c48803f1..8a847ecc 100644 --- a/wm/src/window_adapter.cpp +++ b/wm/src/window_adapter.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowAdapter"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAdapter"}; } WM_IMPLEMENT_SINGLE_INSTANCE(WindowAdapter) diff --git a/wm/src/window_agent.cpp b/wm/src/window_agent.cpp index 4868709f..99ae9b30 100644 --- a/wm/src/window_agent.cpp +++ b/wm/src/window_agent.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowAgent"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAgent"}; } WindowAgent::WindowAgent(sptr& windowImpl) diff --git a/wm/src/window_impl.cpp b/wm/src/window_impl.cpp index ba6e5697..ebc7f8d9 100644 --- a/wm/src/window_impl.cpp +++ b/wm/src/window_impl.cpp @@ -31,7 +31,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowImpl"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowImpl"}; } std::map>> WindowImpl::windowMap_; diff --git a/wm/src/window_input_channel.cpp b/wm/src/window_input_channel.cpp index 8ed85480..3037895e 100644 --- a/wm/src/window_input_channel.cpp +++ b/wm/src/window_input_channel.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowInputChannel"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowInputChannel"}; } WindowInputChannel::WindowInputChannel(const sptr& window) { diff --git a/wm/src/window_manager.cpp b/wm/src/window_manager.cpp index 709d27c1..402af7da 100644 --- a/wm/src/window_manager.cpp +++ b/wm/src/window_manager.cpp @@ -25,7 +25,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManager"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManager"}; } bool WindowInfo::Marshalling(Parcel &parcel) const diff --git a/wm/src/window_proxy.cpp b/wm/src/window_proxy.cpp index 55bfab53..55922f71 100644 --- a/wm/src/window_proxy.cpp +++ b/wm/src/window_proxy.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowProxy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowProxy"}; } void WindowProxy::UpdateWindowProperty(const WindowProperty& windowProperty) diff --git a/wm/src/window_scene.cpp b/wm/src/window_scene.cpp index df093ef7..bf8cdcea 100644 --- a/wm/src/window_scene.cpp +++ b/wm/src/window_scene.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowScene"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowScene"}; } const std::string WindowScene::MAIN_WINDOW_ID = "main window"; diff --git a/wm/src/window_stub.cpp b/wm/src/window_stub.cpp index fe165e0a..308e723d 100644 --- a/wm/src/window_stub.cpp +++ b/wm/src/window_stub.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowStub"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowStub"}; } int WindowStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) diff --git a/wm/src/zidl/window_manager_agent_proxy.cpp b/wm/src/zidl/window_manager_agent_proxy.cpp index 44cf8134..80da77d8 100644 --- a/wm/src/zidl/window_manager_agent_proxy.cpp +++ b/wm/src/zidl/window_manager_agent_proxy.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManagerAgentProxy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManagerAgentProxy"}; } void WindowManagerAgentProxy::UpdateFocusStatus(uint32_t windowId, const sptr& abilityToken, diff --git a/wm/src/zidl/window_manager_agent_stub.cpp b/wm/src/zidl/window_manager_agent_stub.cpp index b960cf88..0a1fd55b 100644 --- a/wm/src/zidl/window_manager_agent_stub.cpp +++ b/wm/src/zidl/window_manager_agent_stub.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManagerAgentStub"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManagerAgentStub"}; } int WindowManagerAgentStub::OnRemoteRequest(uint32_t code, MessageParcel& data, diff --git a/wm/test/systemtest/window_focus_test.cpp b/wm/test/systemtest/window_focus_test.cpp index 744d584b..066fae3f 100644 --- a/wm/test/systemtest/window_focus_test.cpp +++ b/wm/test/systemtest/window_focus_test.cpp @@ -24,7 +24,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowFocusTest"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowFocusTest"}; } using utils = WindowTestUtils; diff --git a/wm/test/systemtest/window_immersive_test.cpp b/wm/test/systemtest/window_immersive_test.cpp index 8a1b6fc8..fd3b6726 100644 --- a/wm/test/systemtest/window_immersive_test.cpp +++ b/wm/test/systemtest/window_immersive_test.cpp @@ -23,7 +23,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowImmersiveTest"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowImmersiveTest"}; const Rect SYS_BAR_REGION_NULL = { 0, 0, 0, 0 }; const SystemBarProperty SYS_BAR_PROP_DEFAULT; diff --git a/wm/test/systemtest/window_move_drag_test.cpp b/wm/test/systemtest/window_move_drag_test.cpp index 2e62e197..ba5f9c19 100644 --- a/wm/test/systemtest/window_move_drag_test.cpp +++ b/wm/test/systemtest/window_move_drag_test.cpp @@ -24,7 +24,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowMoveDrag"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowMoveDrag"}; constexpr float POINT_HOTZONE_RATIO = 0.5; constexpr float DRAG_HOTZONE_RATIO = 0.6; } diff --git a/wm/test/systemtest/window_test_utils.cpp b/wm/test/systemtest/window_test_utils.cpp index 9f5ba90d..0d5c40b4 100644 --- a/wm/test/systemtest/window_test_utils.cpp +++ b/wm/test/systemtest/window_test_utils.cpp @@ -18,7 +18,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowTestUtils"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowTestUtils"}; } Rect WindowTestUtils::displayRect_ = {0, 0, 0, 0}; diff --git a/wm/test/unittest/avoid_area_controller_test.cpp b/wm/test/unittest/avoid_area_controller_test.cpp index f1812f0a..220d895d 100644 --- a/wm/test/unittest/avoid_area_controller_test.cpp +++ b/wm/test/unittest/avoid_area_controller_test.cpp @@ -26,7 +26,7 @@ using namespace testing::ext; namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "AvoidAreaControllerTest"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "AvoidAreaControllerTest"}; const Rect EMPTY_RECT = {0, 0, 0, 0}; const uint32_t LEFT = 0; diff --git a/wmserver/src/avoid_area_controller.cpp b/wmserver/src/avoid_area_controller.cpp index 077bf8c3..b56d28d1 100644 --- a/wmserver/src/avoid_area_controller.cpp +++ b/wmserver/src/avoid_area_controller.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "AvoidAreaController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "AvoidAreaController"}; } const int32_t AVOID_NUM = 4; diff --git a/wmserver/src/input_window_monitor.cpp b/wmserver/src/input_window_monitor.cpp index d632513a..5d9fccbd 100644 --- a/wmserver/src/input_window_monitor.cpp +++ b/wmserver/src/input_window_monitor.cpp @@ -25,7 +25,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "InputWindowMonitor"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "InputWindowMonitor"}; } void InputWindowMonitor::UpdateInputWindow(uint32_t windowId) diff --git a/wmserver/src/window_controller.cpp b/wmserver/src/window_controller.cpp index b6dcee3a..68c61f24 100644 --- a/wmserver/src/window_controller.cpp +++ b/wmserver/src/window_controller.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowController"}; } uint32_t WindowController::GenWindowId() { diff --git a/wmserver/src/window_inner_manager.cpp b/wmserver/src/window_inner_manager.cpp index 766291a5..1526e986 100644 --- a/wmserver/src/window_inner_manager.cpp +++ b/wmserver/src/window_inner_manager.cpp @@ -29,7 +29,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowInnerManager"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowInnerManager"}; } WM_IMPLEMENT_SINGLE_INSTANCE(WindowInnerManager) diff --git a/wmserver/src/window_layout_policy.cpp b/wmserver/src/window_layout_policy.cpp index fb3e150e..af9c3541 100644 --- a/wmserver/src/window_layout_policy.cpp +++ b/wmserver/src/window_layout_policy.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowLayoutPolicy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowLayoutPolicy"}; constexpr uint32_t WINDOW_TITLE_BAR_HEIGHT = 48; constexpr uint32_t WINDOW_FRAME_WIDTH = 4; } diff --git a/wmserver/src/window_layout_policy_cascade.cpp b/wmserver/src/window_layout_policy_cascade.cpp index f43595d9..90dcab42 100644 --- a/wmserver/src/window_layout_policy_cascade.cpp +++ b/wmserver/src/window_layout_policy_cascade.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowLayoutPolicyCascade"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowLayoutPolicyCascade"}; } WindowLayoutPolicyCascade::WindowLayoutPolicyCascade(const Rect& displayRect, const uint64_t& screenId, const sptr& belowAppNode, const sptr& appNode, const sptr& aboveAppNode) diff --git a/wmserver/src/window_manager_agent_controller.cpp b/wmserver/src/window_manager_agent_controller.cpp index c8a93b32..cbbb66c0 100644 --- a/wmserver/src/window_manager_agent_controller.cpp +++ b/wmserver/src/window_manager_agent_controller.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManagerAgentController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManagerAgentController"}; } WM_IMPLEMENT_SINGLE_INSTANCE(WindowManagerAgentController) diff --git a/wmserver/src/window_manager_proxy.cpp b/wmserver/src/window_manager_proxy.cpp index 89b79f69..d52c7300 100644 --- a/wmserver/src/window_manager_proxy.cpp +++ b/wmserver/src/window_manager_proxy.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManagerProxy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManagerProxy"}; } diff --git a/wmserver/src/window_manager_service.cpp b/wmserver/src/window_manager_service.cpp index 12c8e874..2265b8c9 100644 --- a/wmserver/src/window_manager_service.cpp +++ b/wmserver/src/window_manager_service.cpp @@ -34,7 +34,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManagerService"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManagerService"}; } WM_IMPLEMENT_SINGLE_INSTANCE(WindowManagerService) diff --git a/wmserver/src/window_manager_stub.cpp b/wmserver/src/window_manager_stub.cpp index 09ed51b1..b1ad3275 100644 --- a/wmserver/src/window_manager_stub.cpp +++ b/wmserver/src/window_manager_stub.cpp @@ -20,7 +20,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowManagerStub"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowManagerStub"}; } int32_t WindowManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/wmserver/src/window_node_container.cpp b/wmserver/src/window_node_container.cpp index e5b27e49..18867a49 100644 --- a/wmserver/src/window_node_container.cpp +++ b/wmserver/src/window_node_container.cpp @@ -32,7 +32,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowNodeContainer"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowNodeContainer"}; constexpr int WINDOW_NAME_MAX_LENGTH = 10; } diff --git a/wmserver/src/window_root.cpp b/wmserver/src/window_root.cpp index adf5b2c0..a379fbaa 100644 --- a/wmserver/src/window_root.cpp +++ b/wmserver/src/window_root.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowRoot"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowRoot"}; } sptr WindowRoot::GetOrCreateWindowNodeContainer(DisplayId displayId) { diff --git a/wmserver/src/window_snapshot/snapshot_controller.cpp b/wmserver/src/window_snapshot/snapshot_controller.cpp index d4b28956..b68f25bd 100644 --- a/wmserver/src/window_snapshot/snapshot_controller.cpp +++ b/wmserver/src/window_snapshot/snapshot_controller.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "SnapshotController"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SnapshotController"}; } void SnapshotController::Init(sptr& root) diff --git a/wmserver/src/window_snapshot/snapshot_proxy.cpp b/wmserver/src/window_snapshot/snapshot_proxy.cpp index e61d67f5..654311d6 100644 --- a/wmserver/src/window_snapshot/snapshot_proxy.cpp +++ b/wmserver/src/window_snapshot/snapshot_proxy.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "SnapshotProxy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SnapshotProxy"}; } int32_t SnapshotProxy::GetSnapshot(const sptr &token, AAFwk::Snapshot& snapshot) diff --git a/wmserver/src/window_snapshot/snapshot_stub.cpp b/wmserver/src/window_snapshot/snapshot_stub.cpp index d4435b4f..f139aa65 100644 --- a/wmserver/src/window_snapshot/snapshot_stub.cpp +++ b/wmserver/src/window_snapshot/snapshot_stub.cpp @@ -21,7 +21,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "SnapshotStub"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SnapshotStub"}; } int32_t SnapshotStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, diff --git a/wmserver/src/window_zorder_policy.cpp b/wmserver/src/window_zorder_policy.cpp index 1a41d6fb..65451a4a 100644 --- a/wmserver/src/window_zorder_policy.cpp +++ b/wmserver/src/window_zorder_policy.cpp @@ -19,7 +19,7 @@ namespace OHOS { namespace Rosen { namespace { - constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, 0, "WindowZorderPolicy"}; + constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowZorderPolicy"}; } int32_t WindowZorderPolicy::GetWindowPriority(WindowType type) const