diff --git a/services/param/watcher/agent/watcher_manager_kits.cpp b/services/param/watcher/agent/watcher_manager_kits.cpp index 971bd174a426a1a5e0b6e86e7d071584035b304e..3e167dc4b1fc7898a11660b4c2bc7bbbf8e48825 100644 --- a/services/param/watcher/agent/watcher_manager_kits.cpp +++ b/services/param/watcher/agent/watcher_manager_kits.cpp @@ -133,6 +133,7 @@ uint32_t WatcherManagerKits::GetRemoteWatcher(void) WATCHER_CHECK(watcherManager != nullptr, return 0, "Failed to get watcher manager"); remoteWatcher_ = new RemoteWatcher(this); WATCHER_CHECK(remoteWatcher_ != nullptr, return 0, "Failed to create watcher"); + WATCHER_LOGE("CJ WatcherManagerKits::GetRemoteWatcher remoteWatcher_ addr is:%p", static_cast(remoteWatcher_)); remoteWatcherId_ = watcherManager->AddRemoteWatcher(getpid(), remoteWatcher_); WATCHER_CHECK(remoteWatcherId_ != 0, return 0, "Failed to add watcher"); return remoteWatcherId_; @@ -197,6 +198,7 @@ int32_t WatcherManagerKits::DelWatcher(const std::string &keyPrefix, ParameterCh if (watchers_.empty()) { // no watcher, so delete remote agent watcherManager->DelRemoteWatcher(remoteWatcherId_); remoteWatcherId_ = 0; + WATCHER_LOGE("CJ WatcherManagerKits::DelWatcher remoteWatcher_ addr is:%p", static_cast(remoteWatcher_)); remoteWatcher_ = nullptr; } } diff --git a/services/param/watcher/agent/watcher_manager_proxy.cpp b/services/param/watcher/agent/watcher_manager_proxy.cpp index 32f7b03d1e52828d45559fe912e3502381ef327a..5f52b367b3ee03db48406f51de9e21a4d90d5a4e 100644 --- a/services/param/watcher/agent/watcher_manager_proxy.cpp +++ b/services/param/watcher/agent/watcher_manager_proxy.cpp @@ -21,6 +21,7 @@ namespace init_param { uint32_t WatcherManagerProxy::AddRemoteWatcher(uint32_t id, const sptr &watcher) { WATCHER_CHECK(watcher != nullptr, return ERR_INVALID_VALUE, "Invalid param"); + WATCHER_LOGE("CJ WatcherManagerProxy::AddRemoteWatcher watcher addr is:%p", static_cast(watcher)); MessageParcel data; data.WriteInterfaceToken(WatcherManagerProxy::GetDescriptor()); bool ret = data.WriteRemoteObject(watcher->AsObject()); diff --git a/services/param/watcher/proxy/watcher_manager.cpp b/services/param/watcher/proxy/watcher_manager.cpp index fda7a4e54a7c27d488910b7db22c46448711e0b6..f076ef2c734256874649aa415718567ae3bfb8ea 100644 --- a/services/param/watcher/proxy/watcher_manager.cpp +++ b/services/param/watcher/proxy/watcher_manager.cpp @@ -164,6 +164,7 @@ void WatcherGroup::ProcessParameterChange( // walk watcher TraversalNode([this, mananger, name, value](ParamWatcherListPtr list, WatcherNodePtr node, uint32_t index) { auto remoteWatcher = mananger->GetRemoteWatcher(node->GetNodeId()); + WATCHER_LOGE("CJ mananger->GetRemoteWatcher remoteWatcher is:%p", static_cast(remoteWatcher)); if (remoteWatcher == nullptr) { return; } @@ -509,6 +510,7 @@ void WatcherManager::Clear(void) list->RemoveNode(node); auto remoteWatcher = ConvertTo(node); WATCHER_LOGV("Delete remote watcher %u", remoteWatcher->GetRemoteWatcherId()); + WATCHER_LOGE("CJ WatcherManager::Clear remoteWatcher"); delete remoteWatcher; }); delete remoteWatchers_;