Enable logging
Record the permission_broker daemon traces into the syslog,
so people debugging chrome.usb webapps can understand why they cannot
find a particular USB device.
BUG=none
TEST=none
Change-Id: Iffe6c57763ffb0732945d2371e162d47e154a3ea
diff --git a/permission_broker_main.cc b/permission_broker_main.cc
index 4cf98a1..537c6d0 100644
--- a/permission_broker_main.cc
+++ b/permission_broker_main.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <chromeos/syslog_logging.h>
#include <gflags/gflags.h>
#include <glib-object.h>
#include <linux/usb/ch9.h>
+#include "base/command_line.h"
#include "base/logging.h"
#include "permission_broker/allow_usb_device_rule.h"
#include "permission_broker/deny_claimed_usb_device_rule.h"
@@ -26,6 +28,8 @@
int main(int argc, char **argv) {
g_type_init();
google::ParseCommandLineFlags(&argc, &argv, true);
+ CommandLine::Init(argc, argv);
+ chromeos::InitLog(chromeos::kLogToSyslog);
PermissionBroker broker;
broker.AddRule(new AllowUsbDeviceRule());