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/virtio_ethernet.cc b/virtio_ethernet.cc
index 0e400e0..d748871 100644
--- a/virtio_ethernet.cc
+++ b/virtio_ethernet.cc
@@ -13,6 +13,7 @@
#include "shill/control_interface.h"
#include "shill/event_dispatcher.h"
#include "shill/manager.h"
+#include "shill/scope_logger.h"
using std::string;
@@ -32,7 +33,7 @@
link_name,
address,
interface_index) {
- VLOG(2) << "VirtioEthernet device " << link_name << " initialized.";
+ SLOG(Ethernet, 2) << "VirtioEthernet device " << link_name << " initialized.";
}
VirtioEthernet::~VirtioEthernet() {
@@ -52,9 +53,9 @@
// transmit any frames. (See crosbug.com/29494)
//
// To avoid this, we sleep to let the device setup function complete.
- VLOG(2) << "Sleeping to let virtio initialize.";
+ SLOG(Ethernet, 2) << "Sleeping to let virtio initialize.";
sleep(2);
- VLOG(2) << "Starting virtio Ethernet.";
+ SLOG(Ethernet, 2) << "Starting virtio Ethernet.";
Ethernet::Start(error, callback);
}