shill: Replace VLOG with SLOG.

This CL replaces all uses of VLOG(level) with SLOG(scope, level) with
the same verbose level and an appropriate scope for each affected
logging statement.

BUG=chromium-os:29641
TEST=Build and run unit tests. Test scope logging with ff_debug.

Change-Id: Ifdcf1faa2a309bcbd9ee369a66179ce9c7f1ad19
Reviewed-on: https://gerrit.chromium.org/gerrit/20629
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
diff --git a/dhcp_provider.cc b/dhcp_provider.cc
index dce358f..611fe51 100644
--- a/dhcp_provider.cc
+++ b/dhcp_provider.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -10,6 +10,7 @@
 #include "shill/dhcp_config.h"
 #include "shill/dhcpcd_proxy.h"
 #include "shill/proxy_factory.h"
+#include "shill/scope_logger.h"
 
 using std::string;
 
@@ -24,11 +25,11 @@
       control_interface_(NULL),
       dispatcher_(NULL),
       glib_(NULL) {
-  VLOG(2) << __func__;
+  SLOG(DHCP, 2) << __func__;
 }
 
 DHCPProvider::~DHCPProvider() {
-  VLOG(2) << __func__;
+  SLOG(DHCP, 2) << __func__;
 }
 
 DHCPProvider* DHCPProvider::GetInstance() {
@@ -38,7 +39,7 @@
 void DHCPProvider::Init(ControlInterface *control_interface,
                         EventDispatcher *dispatcher,
                         GLib *glib) {
-  VLOG(2) << __func__;
+  SLOG(DHCP, 2) << __func__;
   listener_.reset(new DHCPCDListener(proxy_factory_->connection(), this));
   glib_ = glib;
   control_interface_ = control_interface;
@@ -47,13 +48,13 @@
 
 DHCPConfigRefPtr DHCPProvider::CreateConfig(const string &device_name,
                                             const string &host_name) {
-  VLOG(2) << __func__ << " device: " << device_name;
+  SLOG(DHCP, 2) << __func__ << " device: " << device_name;
   return new DHCPConfig(
       control_interface_, dispatcher_, this, device_name, host_name, glib_);
 }
 
 DHCPConfigRefPtr DHCPProvider::GetConfig(int pid) {
-  VLOG(2) << __func__ << " pid: " << pid;
+  SLOG(DHCP, 2) << __func__ << " pid: " << pid;
   PIDConfigMap::const_iterator it = configs_.find(pid);
   if (it == configs_.end()) {
     return NULL;
@@ -62,12 +63,12 @@
 }
 
 void DHCPProvider::BindPID(int pid, const DHCPConfigRefPtr &config) {
-  VLOG(2) << __func__ << " pid: " << pid;
+  SLOG(DHCP, 2) << __func__ << " pid: " << pid;
   configs_[pid] = config;
 }
 
 void DHCPProvider::UnbindPID(int pid) {
-  VLOG(2) << __func__ << " pid: " << pid;
+  SLOG(DHCP, 2) << __func__ << " pid: " << pid;
   configs_.erase(pid);
 }