OSDN Git Service

GD-HCI: Change command and event logs from INFO to DEBUG
authorJack He <siyuanh@google.com>
Tue, 6 Oct 2020 22:52:40 +0000 (15:52 -0700)
committerJack He <siyuanh@google.com>
Tue, 6 Oct 2020 22:53:55 +0000 (15:53 -0700)
* So that they are not enabled by default

Bug: 164932634
Tag: #gd-refactor
Test: manual testing
Change-Id: I9ff67922b0305cd6397d497dccd038e0444a1d03

main/shim/hci_layer.cc

index 01124ea..60ac189 100644 (file)
@@ -357,8 +357,8 @@ static void set_data_cb(
 void OnTransmitPacketCommandComplete(command_complete_cb complete_callback,
                                      void* context,
                                      bluetooth::hci::CommandCompleteView view) {
-  LOG_INFO("Received cmd complete for %s",
-           bluetooth::hci::OpCodeText(view.GetCommandOpCode()).c_str());
+  LOG_DEBUG("Received cmd complete for %s",
+            bluetooth::hci::OpCodeText(view.GetCommandOpCode()).c_str());
   std::vector<const uint8_t> data(view.begin(), view.end());
   BT_HDR* response = WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, &view);
   complete_callback(response, context);
@@ -385,9 +385,9 @@ class OsiObject {
 void OnTransmitPacketStatus(command_status_cb status_callback, void* context,
                             std::unique_ptr<OsiObject> command,
                             bluetooth::hci::CommandStatusView view) {
-  LOG_INFO("Received cmd status %s for %s",
-           bluetooth::hci::ErrorCodeText(view.GetStatus()).c_str(),
-           bluetooth::hci::OpCodeText(view.GetCommandOpCode()).c_str());
+  LOG_DEBUG("Received cmd status %s for %s",
+            bluetooth::hci::ErrorCodeText(view.GetStatus()).c_str(),
+            bluetooth::hci::OpCodeText(view.GetCommandOpCode()).c_str());
   uint8_t status = static_cast<uint8_t>(view.GetStatus());
   status_callback(status, static_cast<BT_HDR*>(command->Release()), context);
 }
@@ -416,7 +416,7 @@ static void transmit_command(BT_HDR* command,
   auto packet =
       bluetooth::hci::CommandPacketBuilder::Create(op_code, std::move(payload));
 
-  LOG_INFO("Sending command %s", bluetooth::hci::OpCodeText(op_code).c_str());
+  LOG_DEBUG("Sending command %s", bluetooth::hci::OpCodeText(op_code).c_str());
 
   if (IsCommandStatusOpcode(op_code)) {
     auto command_unique = std::make_unique<OsiObject>(command);