service: Support base switches::kV
This is a libbase built-in command-line flag to set log verbosity,
so that the VLOG macro does the right thing. This CL enables that for
the daemon. To enable VLOGs with a given verbosity level and below, do
bluetoothtbd --v=<level>
Change-Id: I128a42c52425c37640c016c3c6158419cc1c0f66
diff --git a/service/main.cpp b/service/main.cpp
index 2f28815..93eb25f 100644
--- a/service/main.cpp
+++ b/service/main.cpp
@@ -38,6 +38,12 @@
base::AtExitManager exit_manager;
base::CommandLine::Init(argc, argv);
+ logging::LoggingSettings log_settings;
+ if (!logging::InitLogging(log_settings)) {
+ LOG(ERROR) << "Failed to set up logging";
+ return EXIT_FAILURE;
+ }
+
// TODO(armansito): Initialize base/logging. By default it will dump to stdout
// but we might want to change that based on a command-line switch. Figure out
// how to route the logging to Android's syslog. Once that's done, we won't