Added few logging for command notification and DNS-SD updates
Change-Id: I073c46b5ddad450a1d191793195815afa2fc5045
Reviewed-on: https://weave-review.googlesource.com/1300
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/libweave/src/device_registration_info.cc b/libweave/src/device_registration_info.cc
index 5a5fb0d..09c7014 100644
--- a/libweave/src/device_registration_info.cc
+++ b/libweave/src/device_registration_info.cc
@@ -1297,6 +1297,8 @@
if (!connected_to_cloud_)
return;
+ VLOG(1) << "Command notification received: " << command;
+
if (!command.empty()) {
// GCD spec indicates that the command parameter in notification object
// "may be empty if command size is too big".
diff --git a/libweave/src/privet/privet_manager.cc b/libweave/src/privet/privet_manager.cc
index b2a9882..f204304 100644
--- a/libweave/src/privet/privet_manager.cc
+++ b/libweave/src/privet/privet_manager.cc
@@ -162,6 +162,7 @@
}
void Manager::OnChanged() {
+ VLOG(1) << "Manager::OnChanged";
if (publisher_)
publisher_->Update();
}
diff --git a/libweave/src/privet/publisher.cc b/libweave/src/privet/publisher.cc
index 37da735..c2f8236 100644
--- a/libweave/src/privet/publisher.cc
+++ b/libweave/src/privet/publisher.cc
@@ -50,7 +50,7 @@
std::string model_id{cloud_->GetModelId()};
DCHECK_EQ(model_id.size(), 5U);
- VLOG(1) << "Starting peerd advertising.";
+ VLOG(2) << "DNS-SD update requested";
const uint16_t port = device_->GetHttpEnpoint().first;
DCHECK_NE(port, 0);
@@ -77,6 +77,7 @@
auto new_data = std::make_pair(port, txt_record);
if (published_ == new_data)
return;
+ VLOG(1) << "Updating DNS-SD";
published_ = new_data;
dns_sd_->PublishService(kPrivetServiceType, port, txt_record);
}
@@ -85,7 +86,7 @@
if (!published_.first)
return;
published_ = {};
- VLOG(1) << "Stopping service publishing.";
+ VLOG(1) << "Stopping service publishing";
dns_sd_->StopPublishing(kPrivetServiceType);
}