shill: improve logging

- add logging of D-Bus interactions
- convert some error->Populate calls to Error::PopulateAndLog
- slipped in: some whitespace and spelling fixes

BUG=chromium-os:29882
TEST=unit tests

Change-Id: I29cd455cb74cbf467e978a6dc7db3cadac248e43
Reviewed-on: https://gerrit.chromium.org/gerrit/21383
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/profile_dbus_adaptor.cc b/profile_dbus_adaptor.cc
index 7e1026f..46c4e6d 100644
--- a/profile_dbus_adaptor.cc
+++ b/profile_dbus_adaptor.cc
@@ -14,6 +14,7 @@
 #include "shill/error.h"
 #include "shill/profile.h"
 #include "shill/profile_dbus_property_exporter.h"
+#include "shill/scope_logger.h"
 #include "shill/service.h"
 
 using std::map;
@@ -35,25 +36,30 @@
 }
 
 void ProfileDBusAdaptor::EmitBoolChanged(const string &name, bool value) {
+  SLOG(DBus, 2) << __func__ << ": " << name;
   PropertyChanged(name, DBusAdaptor::BoolToVariant(value));
 }
 
 void ProfileDBusAdaptor::EmitUintChanged(const string &name,
                                          uint32 value) {
+  SLOG(DBus, 2) << __func__ << ": " << name;
   PropertyChanged(name, DBusAdaptor::Uint32ToVariant(value));
 }
 
 void ProfileDBusAdaptor::EmitIntChanged(const string &name, int value) {
+  SLOG(DBus, 2) << __func__ << ": " << name;
   PropertyChanged(name, DBusAdaptor::Int32ToVariant(value));
 }
 
 void ProfileDBusAdaptor::EmitStringChanged(const string &name,
                                            const string &value) {
+  SLOG(DBus, 2) << __func__ << ": " << name;
   PropertyChanged(name, DBusAdaptor::StringToVariant(value));
 }
 
 map<string, ::DBus::Variant> ProfileDBusAdaptor::GetProperties(
     ::DBus::Error &error) {
+  SLOG(DBus, 2) << __func__;
   map<string, ::DBus::Variant> properties;
   DBusAdaptor::GetProperties(profile_->store(), &properties, &error);
   return properties;
@@ -62,6 +68,7 @@
 void ProfileDBusAdaptor::SetProperty(const string &name,
                                      const ::DBus::Variant &value,
                                      ::DBus::Error &error) {
+  SLOG(DBus, 2) << __func__ << ": " << name;
   if (DBusAdaptor::SetProperty(profile_->mutable_store(),
                                name,
                                value,
@@ -73,6 +80,7 @@
 map<string, ::DBus::Variant> ProfileDBusAdaptor::GetEntry(
     const std::string &name,
     ::DBus::Error &error) {
+  SLOG(DBus, 2) << __func__ << ": " << name;
   Error e;
   ServiceRefPtr service = profile_->GetServiceFromEntry(name, &e);
   map<string, ::DBus::Variant> properties;
@@ -90,6 +98,7 @@
 
 void ProfileDBusAdaptor::DeleteEntry(const std::string &name,
                                      ::DBus::Error &error) {
+  SLOG(DBus, 2) << __func__ << ": " << name;
   Error e;
   profile_->DeleteEntry(name, &e);
   e.ToDBusError(&error);