shill: add log message reporting wake on WiFi features enabled

Add an INFO log that reports what wake on WiFi features are enabled before
the system enters suspend. This will make it easier to debug wake on WiFi
related bugs since we will know for sure what wake on WiFi capabilities the
system enter suspend with.

Also:
- Only log wake on WiFi suspend/dark resume/resume messages if the
  platform supports wake on WiFi so that logs are less confusing.
- Log wakeup reason and WakeOnWiFi::BeforeSuspendActions connection status
  at the default (INFO) log level.

BUG=chromium:473734
TEST=None.

Change-Id: I2aaa3d07ab98aa3251d4c03334da53b2cc098e5f
Reviewed-on: https://chromium-review.googlesource.com/263972
Tested-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
diff --git a/shill/wifi/wake_on_wifi.cc b/shill/wifi/wake_on_wifi.cc
index 609d7ce..ffe3005 100644
--- a/shill/wifi/wake_on_wifi.cc
+++ b/shill/wifi/wake_on_wifi.cc
@@ -1212,11 +1212,12 @@
     const Closure &renew_dhcp_lease_callback,
     const Closure &remove_supplicant_networks_callback, bool have_dhcp_lease,
     uint32_t time_to_next_lease_renewal) {
-  SLOG(this, 1) << __func__;
 #if defined(DISABLE_WAKE_ON_WIFI)
   // Wake on WiFi not supported, so immediately report success.
   done_callback.Run(Error(Error::kSuccess));
 #else
+  LOG(INFO) << __func__ << ": Wake on WiFi features enabled: "
+            << wake_on_wifi_features_enabled_;
   suspend_actions_done_callback_ = done_callback;
   wake_on_ssid_whitelist_ = ssid_whitelist;
   dark_resume_history_.Clear();
@@ -1238,8 +1239,8 @@
 }
 
 void WakeOnWiFi::OnAfterResume() {
-  SLOG(this, 1) << __func__;
 #if !defined(DISABLE_WAKE_ON_WIFI)
+  SLOG(this, 1) << __func__;
   wake_to_scan_timer_.Stop();
   dhcp_lease_renewal_timer_.Stop();
   if (WakeOnPacketEnabledAndSupported() || WakeOnSSIDEnabledAndSupported()) {
@@ -1258,11 +1259,11 @@
     const Closure &renew_dhcp_lease_callback,
     const InitiateScanCallback &initiate_scan_callback,
     const Closure &remove_supplicant_networks_callback) {
-  SLOG(this, 1) << __func__ << ": "
-                << "Wake reason " << last_wake_reason_;
 #if defined(DISABLE_WAKE_ON_WIFI)
   done_callback.Run(Error(Error::kSuccess));
 #else
+  LOG(INFO) << __func__ << ": "
+            << "Wake reason " << last_wake_reason_;
   metrics_->NotifyWakeOnWiFiOnDarkResume(last_wake_reason_);
   dark_resume_scan_retries_left_ = 0;
   suspend_actions_done_callback_ = done_callback;
@@ -1351,8 +1352,8 @@
     bool start_lease_renewal_timer,
     uint32_t time_to_next_lease_renewal,
     const Closure &remove_supplicant_networks_callback) {
-  SLOG(this, 1) << __func__ << ": "
-                << (is_connected ? "connected" : "not connected");
+  LOG(INFO) << __func__ << ": "
+            << (is_connected ? "connected" : "not connected");
   // Note: No conditional compilation because all entry points to this functions
   // are already conditionally compiled based on DISABLE_WAKE_ON_WIFI.