OSDN Git Service

GD-Logging: Change LOG_DEBUG to LOG_INFO
authorJack He <siyuanh@google.com>
Tue, 6 Oct 2020 05:50:55 +0000 (22:50 -0700)
committerJack He <siyuanh@google.com>
Tue, 6 Oct 2020 18:53:59 +0000 (11:53 -0700)
* Given that LOG_DEBUG will be disabled by default,
  changing existing LOG_DEBUG to LOG_INFO so that
  we don't lose these logs

Bug: 170163727
Test: atest bluetooth_test_gd, manual device test
Tag: #gd-refactor
Change-Id: I84db7751d4bbe6d3ea88122b8cdf72bc150fbe7a

74 files changed:
bta/ag/bta_ag_sco.cc
bta/av/bta_av_aact.cc
bta/av/bta_av_act.cc
bta/av/bta_av_ci.cc
bta/av/bta_av_main.cc
bta/dm/bta_dm_act.cc
bta/dm/bta_dm_pm.cc
bta/gatt/bta_gattc_cache.cc
bta/hh/bta_hh_le.cc
btif/src/btif_a2dp_audio_interface.cc
btif/src/btif_av.cc
btif/src/btif_avrcp_audio_track.cc
btif/src/btif_config.cc
btif/src/btif_core.cc
btif/src/btif_dm.cc
btif/src/btif_gatt_client.cc
btif/src/btif_gatt_server.cc
btif/src/btif_gatt_test.cc
btif/src/btif_sock.cc
btif/src/btif_sock_l2cap.cc
btif/src/btif_sock_rfc.cc
btif/src/btif_sock_thread.cc
btif/src/btif_storage.cc
gd/common/strings.cc
gd/docs/architecture/style_guide.md
gd/dumpsys/internal/filter_internal.cc
gd/grpc/grpc_event_queue.h
gd/hci/facade/acl_manager_facade.cc
gd/hci/facade/le_acl_manager_facade.cc
gd/hci/le_address_manager.cc
gd/l2cap/classic/internal/fixed_channel_impl.cc
gd/l2cap/classic/internal/link.cc
gd/l2cap/classic/internal/link_manager.cc
gd/l2cap/classic/internal/signalling_manager.cc
gd/l2cap/le/internal/fixed_channel_impl.cc
gd/l2cap/le/internal/link.cc
gd/l2cap/le/internal/link_manager.cc
gd/neighbor/discoverability.cc
gd/neighbor/inquiry.cc
gd/neighbor/name.cc
gd/neighbor/page.cc
gd/neighbor/scan.cc
gd/packet/parser/packet_def.cc
gd/security/channel/security_manager_channel_unittest.cc
gd/security/internal/security_manager_impl.cc
gd/security/pairing/classic_pairing_handler.cc
gd/security/pairing/classic_pairing_handler_unittest.cc
gd/shim/l2cap.cc
gd/storage/config_cache.cc
hci/src/hci_layer.cc
main/bte_conf.cc
main/bte_logmsg.cc
main/shim/acl.cc
main/shim/btm.cc
main/shim/btm_api.cc
main/shim/hci_layer.cc
main/shim/l2cap.cc
main/shim/stack.cc
osi/src/alarm.cc
osi/src/allocation_tracker.cc
osi/src/thread.cc
osi/src/wakelock.cc
stack/a2dp/a2dp_aac_encoder.cc
stack/a2dp/a2dp_codec_config.cc
stack/a2dp/a2dp_sbc_encoder.cc
stack/a2dp/a2dp_vendor_aptx_encoder.cc
stack/a2dp/a2dp_vendor_aptx_hd_encoder.cc
stack/a2dp/a2dp_vendor_ldac_decoder.cc
stack/a2dp/a2dp_vendor_ldac_encoder.cc
stack/acl/btm_pm.cc
stack/btm/btm_ble.cc
stack/btm/btm_ble_gap.cc
stack/gatt/connection_manager.cc
vendor_libs/test_vendor_lib/model/controller/link_layer_controller.cc

index 28e446e..79dea99 100644 (file)
@@ -617,10 +617,10 @@ void bta_ag_codec_negotiate(tBTA_AG_SCB* p_scb) {
 static void bta_ag_sco_event(tBTA_AG_SCB* p_scb, uint8_t event) {
   tBTA_AG_SCO_CB* p_sco = &bta_ag_cb.sco;
   uint8_t previous_state = p_sco->state;
-  LOG_DEBUG("index=0x%04x, device=%s, state=%s[%d], event=%s[%d]",
-            p_scb->sco_idx, p_scb->peer_addr.ToString().c_str(),
-            bta_ag_sco_state_str(p_sco->state), p_sco->state,
-            bta_ag_sco_evt_str(event), event);
+  LOG_INFO("index=0x%04x, device=%s, state=%s[%d], event=%s[%d]",
+           p_scb->sco_idx, p_scb->peer_addr.ToString().c_str(),
+           bta_ag_sco_state_str(p_sco->state), p_sco->state,
+           bta_ag_sco_evt_str(event), event);
 
   switch (p_sco->state) {
     case BTA_AG_SCO_SHUTDOWN_ST:
@@ -1229,14 +1229,14 @@ void bta_ag_sco_close(tBTA_AG_SCB* p_scb,
 void bta_ag_sco_codec_nego(tBTA_AG_SCB* p_scb, bool result) {
   if (result) {
     /* Subsequent SCO connection will skip codec negotiation */
-    LOG_DEBUG("Succeeded for index 0x%04x, device %s", p_scb->sco_idx,
-              p_scb->peer_addr.ToString().c_str());
+    LOG_INFO("Succeeded for index 0x%04x, device %s", p_scb->sco_idx,
+             p_scb->peer_addr.ToString().c_str());
     p_scb->codec_updated = false;
     bta_ag_sco_event(p_scb, BTA_AG_SCO_CN_DONE_E);
   } else {
     /* codec negotiation failed */
-    LOG_DEBUG("Failed for index 0x%04x, device %s", p_scb->sco_idx,
-              p_scb->peer_addr.ToString().c_str());
+    LOG_INFO("Failed for index 0x%04x, device %s", p_scb->sco_idx,
+             p_scb->peer_addr.ToString().c_str());
     bta_ag_sco_event(p_scb, BTA_AG_SCO_CLOSE_E);
   }
 }
index 59c4e48..70a88cd 100644 (file)
@@ -1067,7 +1067,7 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
   /* we like this codec_type. find the sep_idx */
   local_sep = bta_av_get_scb_sep_type(p_scb, avdt_handle);
   bta_av_adjust_seps_idx(p_scb, avdt_handle);
-  LOG_DEBUG(
+  LOG_INFO(
       "%s: peer %s bta_handle=0x%x avdt_handle=%d sep_idx=%d cur_psc_mask:0x%x",
       __func__, p_scb->PeerAddress().ToString().c_str(), p_scb->hndl,
       p_scb->avdt_handle, p_scb->sep_idx, p_scb->cur_psc_mask);
@@ -1677,8 +1677,8 @@ void bta_av_getcap_results(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
     else if (uuid_int == UUID_SERVCLASS_AUDIO_SINK)
       bta_av_adjust_seps_idx(p_scb,
                              bta_av_get_scb_handle(p_scb, AVDT_TSEP_SNK));
-    LOG_DEBUG("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
-              p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
+    LOG_INFO("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
+             p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
 
     /* use only the services peer supports */
     cfg.psc_mask &= p_scb->peer_cap.psc_mask;
@@ -1727,8 +1727,8 @@ void bta_av_setconfig_rej(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
   uint8_t avdt_handle = p_data->ci_setconfig.avdt_handle;
 
   bta_av_adjust_seps_idx(p_scb, avdt_handle);
-  LOG_DEBUG("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
-            p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
+  LOG_INFO("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
+           p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
   AVDT_ConfigRsp(p_scb->avdt_handle, p_scb->avdt_label, AVDT_ERR_UNSUP_CFG, 0);
 
   reject.bd_addr = p_data->str_msg.bd_addr;
@@ -2800,8 +2800,8 @@ void bta_av_rcfg_open(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) {
     /* we may choose to use a different SEP at reconfig.
      * adjust the sep_idx now */
     bta_av_adjust_seps_idx(p_scb, bta_av_get_scb_handle(p_scb, AVDT_TSEP_SRC));
-    LOG_DEBUG("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
-              p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
+    LOG_INFO("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
+             p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
 
     /* open the stream with the new config */
     p_scb->sep_info_idx = p_scb->rcfg_idx;
index f05800d..8dd5236 100644 (file)
@@ -305,7 +305,7 @@ static void bta_av_rc_msg_cback(uint8_t handle, uint8_t label, uint8_t opcode,
 uint8_t bta_av_rc_create(tBTA_AV_CB* p_cb, uint8_t role, uint8_t shdl,
                          uint8_t lidx) {
   if (is_new_avrcp_enabled()) {
-    LOG_DEBUG("Skipping RC creation for the old AVRCP profile");
+    LOG_INFO("Skipping RC creation for the old AVRCP profile");
     return BTA_AV_RC_HANDLE_NONE;
   }
 
index ed6523a..30f8ea6 100644 (file)
@@ -70,7 +70,7 @@ void bta_av_ci_src_data_ready(tBTA_AV_CHNL chnl) {
 void bta_av_ci_setconfig(tBTA_AV_HNDL bta_av_handle, uint8_t err_code,
                          uint8_t category, uint8_t num_seid, uint8_t* p_seid,
                          bool recfg_needed, uint8_t avdt_handle) {
-  LOG_DEBUG(
+  LOG_INFO(
       "%s: bta_av_handle=0x%x err_code=%d category=%d "
       "num_seid=%d recfg_needed=%s avdt_handle=%d",
       __func__, bta_av_handle, err_code, category, num_seid,
index 44a6d40..df07c5a 100644 (file)
@@ -328,8 +328,8 @@ void tBTA_AV_SCB::OnDisconnected() {
 
 void tBTA_AV_SCB::SetAvdtpVersion(uint16_t avdtp_version) {
   avdtp_version_ = avdtp_version;
-  LOG_DEBUG("%s: AVDTP version for %s set to 0x%x", __func__,
-            peer_address_.ToString().c_str(), avdtp_version_);
+  LOG_INFO("%s: AVDTP version for %s set to 0x%x", __func__,
+           peer_address_.ToString().c_str(), avdtp_version_);
 }
 
 /*******************************************************************************
index c52188a..238e4fc 100644 (file)
@@ -2720,7 +2720,7 @@ static void bta_dm_set_eir(char* local_name) {
 
   memset(p, 0x00, HCI_EXT_INQ_RESPONSE_LEN);
 
-  LOG_DEBUG("Generating extended inquiry response packet EIR");
+  LOG_INFO("Generating extended inquiry response packet EIR");
 
   if (local_name)
     local_name_len = strlen(local_name);
@@ -3021,12 +3021,11 @@ void bta_dm_eir_update_uuid(uint16_t uuid16, bool adding) {
   if (!BTM_HasEirService(p_bta_dm_eir_cfg->uuid_mask, uuid16)) return;
 
   if (adding) {
-    LOG_DEBUG("EIR Adding UUID=0x%04X into extended inquiry response", uuid16);
+    LOG_INFO("EIR Adding UUID=0x%04X into extended inquiry response", uuid16);
 
     BTM_AddEirService(bta_dm_cb.eir_uuid, uuid16);
   } else {
-    LOG_DEBUG("EIR Removing UUID=0x%04X from extended inquiry response",
-              uuid16);
+    LOG_INFO("EIR Removing UUID=0x%04X from extended inquiry response", uuid16);
 
     BTM_RemoveEirService(bta_dm_cb.eir_uuid, uuid16);
   }
index e8e4427..005d4e3 100644 (file)
@@ -416,7 +416,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
     bta_dm_conn_srvcs.conn_srvc[j].new_request = true;
     bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr = peer_addr;
 
-    LOG_DEBUG("New connection service id:%d app_id:%d", id, app_id);
+    LOG_INFO("New connection service id:%d app_id:%d", id, app_id);
 
     bta_dm_conn_srvcs.count++;
     bta_dm_conn_srvcs.conn_srvc[j].state = status;
index fcd5d4f..0da7d64 100644 (file)
@@ -779,7 +779,7 @@ void bta_gattc_get_gatt_db(uint16_t conn_id, uint16_t start_handle,
                            int* count) {
   tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id);
 
-  LOG_DEBUG("%s", __func__);
+  LOG_INFO("%s", __func__);
   if (p_clcb == NULL) {
     LOG(ERROR) << "Unknown conn_id=" << loghex(conn_id);
     return;
index be2f2de..2779b68 100755 (executable)
@@ -1380,8 +1380,8 @@ static void bta_hh_le_search_hid_chars(tBTA_HH_DEV_CB* p_dev_cb,
     if (!charac.uuid.Is16Bit()) continue;
 
     uint16_t uuid16 = charac.uuid.As16Bit();
-    LOG_DEBUG("%s: %s %s", __func__, bta_hh_uuid_to_str(uuid16),
-              charac.uuid.ToString().c_str());
+    LOG_INFO("%s: %s %s", __func__, bta_hh_uuid_to_str(uuid16),
+             charac.uuid.ToString().c_str());
 
     switch (uuid16) {
       case GATT_UUID_HID_CONTROL_POINT:
index b304693..6f7e488 100644 (file)
@@ -277,9 +277,8 @@ static void btif_a2dp_audio_interface_init() {
     LOG_ERROR("%s: Cannot observe the Bluetooth Audio HAL's death", __func__);
   }
 
-  LOG_DEBUG("%s: IBluetoothAudioOffload::getService() returned %p (%s)",
-            __func__, btAudio.get(),
-            (btAudio->isRemote() ? "remote" : "local"));
+  LOG_INFO("%s: IBluetoothAudioOffload::getService() returned %p (%s)",
+           __func__, btAudio.get(), (btAudio->isRemote() ? "remote" : "local"));
 
   LOG_INFO("%s:Init returned", __func__);
 }
index 7d3b662..ffc0950 100644 (file)
@@ -3229,13 +3229,13 @@ bool btif_av_is_connected(void) {
 uint8_t btif_av_get_peer_sep(void) {
   BtifAvPeer* peer = btif_av_find_active_peer();
   if (peer == nullptr) {
-    LOG_DEBUG("No active sink or source peer found");
+    LOG_INFO("No active sink or source peer found");
     return AVDT_TSEP_SNK;
   }
 
   uint8_t peer_sep = peer->PeerSep();
-  LOG_DEBUG("Peer %s SEP is %s (%d)", peer->PeerAddress().ToString().c_str(),
-            (peer_sep == AVDT_TSEP_SRC) ? "Source" : "Sink", peer_sep);
+  LOG_INFO("Peer %s SEP is %s (%d)", peer->PeerAddress().ToString().c_str(),
+           (peer_sep == AVDT_TSEP_SRC) ? "Source" : "Sink", peer_sep);
   return peer_sep;
 }
 
index ca9ce9a..8ca5c97 100644 (file)
@@ -88,7 +88,7 @@ void BtifAvrcpAudioTrackStart(void* handle) {
 
 void BtifAvrcpAudioTrackStop(void* handle) {
   if (handle == NULL) {
-    LOG_DEBUG("%s handle is null.", __func__);
+    LOG_INFO("%s handle is null.", __func__);
     return;
   }
   BtifAvrcpAudioTrack* trackHolder = static_cast<BtifAvrcpAudioTrack*>(handle);
@@ -100,7 +100,7 @@ void BtifAvrcpAudioTrackStop(void* handle) {
 
 void BtifAvrcpAudioTrackDelete(void* handle) {
   if (handle == NULL) {
-    LOG_DEBUG("%s handle is null.", __func__);
+    LOG_INFO("%s handle is null.", __func__);
     return;
   }
   BtifAvrcpAudioTrack* trackHolder = static_cast<BtifAvrcpAudioTrack*>(handle);
@@ -121,7 +121,7 @@ void BtifAvrcpAudioTrackDelete(void* handle) {
 
 void BtifAvrcpAudioTrackPause(void* handle) {
   if (handle == NULL) {
-    LOG_DEBUG("%s handle is null.", __func__);
+    LOG_INFO("%s handle is null.", __func__);
     return;
   }
   BtifAvrcpAudioTrack* trackHolder = static_cast<BtifAvrcpAudioTrack*>(handle);
@@ -134,7 +134,7 @@ void BtifAvrcpAudioTrackPause(void* handle) {
 
 void BtifAvrcpSetAudioTrackGain(void* handle, float gain) {
   if (handle == NULL) {
-    LOG_DEBUG("%s handle is null.", __func__);
+    LOG_INFO("%s handle is null.", __func__);
     return;
   }
   // Does nothing right now
index d633d3b..b206f62 100644 (file)
@@ -136,7 +136,7 @@ bool btif_get_device_type(const RawAddress& bda, int* p_device_type) {
 
   if (!btif_config_get_int(bd_addr_str, "DevType", p_device_type)) return false;
 
-  LOG_DEBUG("Device [%s] device type %d", bd_addr_str, *p_device_type);
+  LOG_INFO("Device [%s] device type %d", bd_addr_str, *p_device_type);
   return true;
 }
 
@@ -150,7 +150,7 @@ bool btif_get_address_type(const RawAddress& bda, tBLE_ADDR_TYPE* p_addr_type) {
   if (!btif_config_get_int(bd_addr_str, "AddrType", &val)) return false;
   *p_addr_type = static_cast<tBLE_ADDR_TYPE>(val);
 
-  LOG_DEBUG("Device [%s] address type %d", bd_addr_str, *p_addr_type);
+  LOG_INFO("Device [%s] address type %d", bd_addr_str, *p_addr_type);
   return true;
 }
 
index 2f0ea12..295d540 100644 (file)
@@ -265,7 +265,7 @@ void btif_enable_bluetooth_evt() {
       strcmp(bdstr.c_str(), val) != 0) {
     // We failed to get an address or the one in the config file does not match
     // the address given by the controller interface. Update the config cache
-    LOG_DEBUG("%s: Storing '%s' into the config file", __func__, bdstr.c_str());
+    LOG_INFO("%s: Storing '%s' into the config file", __func__, bdstr.c_str());
     btif_config_set_str("Adapter", "Address", bdstr.c_str());
     btif_config_save();
 
index 3fe5224..53e05ca 100644 (file)
@@ -446,7 +446,7 @@ static void bond_state_changed(bt_status_t status, const RawAddress& bd_addr,
   if (pairing_cb.bond_type == tBTM_SEC_DEV_REC::BOND_TYPE_TEMPORARY)
     state = BT_BOND_STATE_NONE;
 
-  LOG_DEBUG(
+  LOG_INFO(
       "Bond state changed to state=%d [0:none, 1:bonding, 2:bonded],"
       " prev_state=%d, sdp_attempts = %d",
       state, pairing_cb.state, pairing_cb.sdp_attempts);
@@ -490,8 +490,8 @@ static void btif_update_remote_version_property(RawAddress* p_bd) {
 
   btm_status = BTM_ReadRemoteVersion(*p_bd, &lmp_ver, &mfct_set, &lmp_subver);
 
-  LOG_DEBUG("remote version info [%s]: %x, %x, %x", p_bd->ToString().c_str(),
-            lmp_ver, mfct_set, lmp_subver);
+  LOG_INFO("remote version info [%s]: %x, %x, %x", p_bd->ToString().c_str(),
+           lmp_ver, mfct_set, lmp_subver);
 
   if (btm_status == BTM_SUCCESS) {
     // Always update cache to ensure we have availability whenever BTM API is
@@ -542,11 +542,11 @@ static void btif_update_remote_properties(const RawAddress& bdaddr,
         &bdaddr, &properties[num_properties]);
     LOG_VERBOSE("cod retrieved from storage is 0x%06x", cod);
     if (cod == 0) {
-      LOG_DEBUG("cod from storage is also unclassified");
+      LOG_INFO("cod from storage is also unclassified");
       cod = COD_UNCLASSIFIED;
     }
   } else {
-    LOG_DEBUG("class of device (cod) is 0x%06x", cod);
+    LOG_INFO("class of device (cod) is 0x%06x", cod);
   }
 
   BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties],
@@ -834,7 +834,7 @@ static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ* p_ssp_cfm_req) {
   cod = devclass2uint(p_ssp_cfm_req->dev_class);
 
   if (cod == 0) {
-    LOG_DEBUG("%s cod is 0, set as unclassified", __func__);
+    LOG_INFO("%s cod is 0, set as unclassified", __func__);
     cod = COD_UNCLASSIFIED;
   }
 
@@ -870,7 +870,7 @@ static void btif_dm_ssp_key_notif_evt(tBTA_DM_SP_KEY_NOTIF* p_ssp_key_notif) {
   cod = devclass2uint(p_ssp_key_notif->dev_class);
 
   if (cod == 0) {
-    LOG_DEBUG("%s cod is 0, set as unclassified", __func__);
+    LOG_INFO("%s cod is 0, set as unclassified", __func__);
     cod = COD_UNCLASSIFIED;
   }
 
@@ -1344,7 +1344,7 @@ static void btif_dm_search_services_evt(tBTA_DM_SEARCH_EVT event,
       int num_properties = 0;
       if (p_data->disc_ble_res.service.As16Bit() == UUID_SERVCLASS_LE_HID ||
           p_data->disc_ble_res.service == UUID_HEARING_AID) {
-        LOG_DEBUG("Found HOGP or HEARING AID UUID");
+        LOG_INFO("Found HOGP or HEARING AID UUID");
         bt_property_t prop[2];
         bt_status_t ret;
 
@@ -1811,7 +1811,7 @@ void btif_dm_start_discovery(void) {
  *
  ******************************************************************************/
 void btif_dm_cancel_discovery(void) {
-  LOG_DEBUG("Cancel search");
+  LOG_INFO("Cancel search");
   BTA_DmSearchCancel();
 }
 
index 21fa037..783a8d9 100644 (file)
@@ -155,7 +155,7 @@ void btif_gattc_upstreams_evt(uint16_t event, char* p_param) {
     }
 
     case BTA_GATTC_ACL_EVT:
-      LOG_DEBUG("BTA_GATTC_ACL_EVT: status = %d", p_data->status);
+      LOG_INFO("BTA_GATTC_ACL_EVT: status = %d", p_data->status);
       /* Ignore for now */
       break;
 
index f0b6a9f..03b4121 100644 (file)
@@ -232,7 +232,7 @@ static void btapp_gatts_handle_cback(uint16_t event, char* p_param) {
     case BTA_GATTS_OPEN_EVT:
     case BTA_GATTS_CANCEL_OPEN_EVT:
     case BTA_GATTS_CLOSE_EVT:
-      LOG_DEBUG("%s: Empty event (%d)!", __func__, event);
+      LOG_INFO("%s: Empty event (%d)!", __func__, event);
       break;
 
     case BTA_GATTS_PHY_UPDATE_EVT:
index 6f10ca6..b3b2c37 100644 (file)
@@ -69,15 +69,15 @@ static btif_test_cb_t test_cb;
 static void btif_test_connect_cback(tGATT_IF, const RawAddress&,
                                     uint16_t conn_id, bool connected,
                                     tGATT_DISCONN_REASON, tBT_TRANSPORT) {
-  LOG_DEBUG("%s: conn_id=%d, connected=%d", __func__, conn_id, connected);
+  LOG_INFO("%s: conn_id=%d, connected=%d", __func__, conn_id, connected);
   test_cb.conn_id = connected ? conn_id : 0;
 }
 
 static void btif_test_command_complete_cback(uint16_t conn_id, tGATTC_OPTYPE op,
                                              tGATT_STATUS status,
                                              tGATT_CL_COMPLETE* p_data) {
-  LOG_DEBUG("%s: op_code=0x%02x, conn_id=0x%x. status=0x%x", __func__, op,
-            conn_id, status);
+  LOG_INFO("%s: op_code=0x%02x, conn_id=0x%x. status=0x%x", __func__, op,
+           conn_id, status);
 
   switch (op) {
     case GATTC_OPTYPE_READ:
@@ -92,7 +92,7 @@ static void btif_test_command_complete_cback(uint16_t conn_id, tGATTC_OPTYPE op,
       break;
 
     default:
-      LOG_DEBUG("%s: Unknown op_code (0x%02x)", __func__, op);
+      LOG_INFO("%s: Unknown op_code (0x%02x)", __func__, op);
       break;
   }
 }
@@ -100,58 +100,58 @@ static void btif_test_command_complete_cback(uint16_t conn_id, tGATTC_OPTYPE op,
 static void btif_test_discovery_result_cback(UNUSED_ATTR uint16_t conn_id,
                                              tGATT_DISC_TYPE disc_type,
                                              tGATT_DISC_RES* p_data) {
-  LOG_DEBUG("------ GATT Discovery result %-22s -------", disc_name[disc_type]);
-  LOG_DEBUG("      Attribute handle: 0x%04x (%d)", p_data->handle,
-            p_data->handle);
+  LOG_INFO("------ GATT Discovery result %-22s -------", disc_name[disc_type]);
+  LOG_INFO("      Attribute handle: 0x%04x (%d)", p_data->handle,
+           p_data->handle);
 
   if (disc_type != GATT_DISC_CHAR_DSCPT) {
-    LOG_DEBUG("        Attribute type: %s", p_data->type.ToString().c_str());
+    LOG_INFO("        Attribute type: %s", p_data->type.ToString().c_str());
   }
 
   switch (disc_type) {
     case GATT_DISC_SRVC_ALL:
-      LOG_DEBUG("          Handle range: 0x%04x ~ 0x%04x (%d ~ %d)",
-                p_data->handle, p_data->value.group_value.e_handle,
-                p_data->handle, p_data->value.group_value.e_handle);
-      LOG_DEBUG("          Service UUID: %s",
-                p_data->value.group_value.service_type.ToString().c_str());
+      LOG_INFO("          Handle range: 0x%04x ~ 0x%04x (%d ~ %d)",
+               p_data->handle, p_data->value.group_value.e_handle,
+               p_data->handle, p_data->value.group_value.e_handle);
+      LOG_INFO("          Service UUID: %s",
+               p_data->value.group_value.service_type.ToString().c_str());
       break;
 
     case GATT_DISC_SRVC_BY_UUID:
-      LOG_DEBUG("          Handle range: 0x%04x ~ 0x%04x (%d ~ %d)",
-                p_data->handle, p_data->value.handle, p_data->handle,
-                p_data->value.handle);
+      LOG_INFO("          Handle range: 0x%04x ~ 0x%04x (%d ~ %d)",
+               p_data->handle, p_data->value.handle, p_data->handle,
+               p_data->value.handle);
       break;
 
     case GATT_DISC_INC_SRVC:
-      LOG_DEBUG("          Handle range: 0x%04x ~ 0x%04x (%d ~ %d)",
-                p_data->value.incl_service.s_handle,
-                p_data->value.incl_service.e_handle,
-                p_data->value.incl_service.s_handle,
-                p_data->value.incl_service.e_handle);
-      LOG_DEBUG("          Service UUID: %s",
-                p_data->value.incl_service.service_type.ToString().c_str());
+      LOG_INFO("          Handle range: 0x%04x ~ 0x%04x (%d ~ %d)",
+               p_data->value.incl_service.s_handle,
+               p_data->value.incl_service.e_handle,
+               p_data->value.incl_service.s_handle,
+               p_data->value.incl_service.e_handle);
+      LOG_INFO("          Service UUID: %s",
+               p_data->value.incl_service.service_type.ToString().c_str());
       break;
 
     case GATT_DISC_CHAR:
-      LOG_DEBUG("            Properties: 0x%02x",
-                p_data->value.dclr_value.char_prop);
-      LOG_DEBUG("   Characteristic UUID: %s",
-                p_data->value.dclr_value.char_uuid.ToString().c_str());
+      LOG_INFO("            Properties: 0x%02x",
+               p_data->value.dclr_value.char_prop);
+      LOG_INFO("   Characteristic UUID: %s",
+               p_data->value.dclr_value.char_uuid.ToString().c_str());
       break;
 
     case GATT_DISC_CHAR_DSCPT:
-      LOG_DEBUG("       Descriptor UUID: %s", p_data->type.ToString().c_str());
+      LOG_INFO("       Descriptor UUID: %s", p_data->type.ToString().c_str());
       break;
   }
 
-  LOG_DEBUG("-----------------------------------------------------------");
+  LOG_INFO("-----------------------------------------------------------");
 }
 
 static void btif_test_discovery_complete_cback(
     UNUSED_ATTR uint16_t conn_id, UNUSED_ATTR tGATT_DISC_TYPE disc_type,
     tGATT_STATUS status) {
-  LOG_DEBUG("%s: status=%d", __func__, status);
+  LOG_INFO("%s: status=%d", __func__, status);
 }
 
 static tGATT_CBACK btif_test_callbacks = {btif_test_connect_cback,
@@ -173,7 +173,7 @@ bt_status_t btif_gattc_test_command_impl(int command,
   switch (command) {
     case 0x01: /* Enable */
     {
-      LOG_DEBUG("%s: ENABLE - enable=%d", __func__, params->u1);
+      LOG_INFO("%s: ENABLE - enable=%d", __func__, params->u1);
       if (params->u1) {
         std::array<uint8_t, Uuid::kNumBytes128> tmp;
         tmp.fill(0xAE);
@@ -189,8 +189,8 @@ bt_status_t btif_gattc_test_command_impl(int command,
 
     case 0x02: /* Connect */
     {
-      LOG_DEBUG("%s: CONNECT - device=%s (dev_type=%d, addr_type=%d)", __func__,
-                params->bda1->ToString().c_str(), params->u1, params->u2);
+      LOG_INFO("%s: CONNECT - device=%s (dev_type=%d, addr_type=%d)", __func__,
+               params->bda1->ToString().c_str(), params->u1, params->u2);
 
       if (params->u1 == BT_DEVICE_TYPE_BLE)
         BTM_SecAddBleDevice(*params->bda1, NULL, BT_DEVICE_TYPE_BLE,
@@ -205,7 +205,7 @@ bt_status_t btif_gattc_test_command_impl(int command,
 
     case 0x03: /* Disconnect */
     {
-      LOG_DEBUG("%s: DISCONNECT - conn_id=%d", __func__, test_cb.conn_id);
+      LOG_INFO("%s: DISCONNECT - conn_id=%d", __func__, test_cb.conn_id);
       GATT_Disconnect(test_cb.conn_id);
       break;
     }
@@ -217,18 +217,18 @@ bt_status_t btif_gattc_test_command_impl(int command,
         return (bt_status_t)0;
       }
 
-      LOG_DEBUG("%s: DISCOVER (%s), conn_id=%d, uuid=%s, handles=0x%04x-0x%04x",
-                __func__, disc_name[params->u1], test_cb.conn_id,
-                params->uuid1->ToString().c_str(), params->u2, params->u3);
+      LOG_INFO("%s: DISCOVER (%s), conn_id=%d, uuid=%s, handles=0x%04x-0x%04x",
+               __func__, disc_name[params->u1], test_cb.conn_id,
+               params->uuid1->ToString().c_str(), params->u2, params->u3);
       GATTC_Discover(test_cb.conn_id, params->u1, params->u2, params->u3,
                      *params->uuid1);
       break;
     }
 
     case 0xF0: /* Pairing configuration */
-      LOG_DEBUG("%s: Setting pairing config auth=%d, iocaps=%d, keys=%d/%d/%d",
-                __func__, params->u1, params->u2, params->u3, params->u4,
-                params->u5);
+      LOG_INFO("%s: Setting pairing config auth=%d, iocaps=%d, keys=%d/%d/%d",
+               __func__, params->u1, params->u2, params->u3, params->u4,
+               params->u5);
 
       bte_appl_cfg.ble_auth_req = params->u1;
       bte_appl_cfg.ble_io_cap = params->u2;
index f41eb9d..64de9de 100644 (file)
@@ -162,7 +162,7 @@ static bt_status_t btsock_listen(btsock_type_t type, const char* service_name,
         break;
       }
       flags |= BTSOCK_FLAG_LE_COC;
-      LOG_DEBUG(
+      LOG_INFO(
 
           "%s: type=BTSOCK_L2CAP_LE, channel=0x%x, original=0x%x, flags=0x%x",
           __func__, channel, original_channel, flags);
@@ -225,8 +225,8 @@ static bt_status_t btsock_connect(const RawAddress* bd_addr, btsock_type_t type,
         BTA_DmAddBleDevice(*bd_addr, addr_type, device_type);
       }
 
-      LOG_DEBUG("%s: type=BTSOCK_L2CAP_LE, channel=0x%x, flags=0x%x", __func__,
-                channel, flags);
+      LOG_INFO("%s: type=BTSOCK_L2CAP_LE, channel=0x%x, flags=0x%x", __func__,
+               channel, flags);
       status = btsock_l2cap_connect(bd_addr, channel, sock_fd, flags, app_uid);
       break;
     }
index 79ef64a..7b7d049 100644 (file)
@@ -235,8 +235,8 @@ static void btsock_l2cap_free_l(l2cap_socket* sock) {
     }
     if ((sock->channel >= 0) && (sock->server)) {
       BTA_JvFreeChannel(sock->channel, BTA_JV_CONN_TYPE_L2CAP_LE);
-      LOG_DEBUG("Stopped L2CAP LE COC server socket_id:%u channel:%u", sock->id,
-                sock->channel);
+      LOG_INFO("Stopped L2CAP LE COC server socket_id:%u channel:%u", sock->id,
+               sock->channel);
       BTA_JvL2capStopServer(sock->channel, sock->id);
     }
   } else {
@@ -313,7 +313,7 @@ static l2cap_socket* btsock_l2cap_alloc_l(const char* name,
       sock->id++;
   }
   last_sock_id = sock->id;
-  LOG_DEBUG("Allocated l2cap socket structure socket_id:%u", sock->id);
+  LOG_INFO("Allocated l2cap socket structure socket_id:%u", sock->id);
   return sock;
 
 fail_sockpair:
@@ -337,8 +337,8 @@ bt_status_t btsock_l2cap_cleanup() {
 }
 
 static inline bool send_app_psm_or_chan_l(l2cap_socket* sock) {
-  LOG_DEBUG("Sending l2cap socket socket_id:%u channel:%d", sock->id,
-            sock->channel);
+  LOG_INFO("Sending l2cap socket socket_id:%u channel:%d", sock->id,
+           sock->channel);
   return sock_send_all(sock->our_fd, (const uint8_t*)&sock->channel,
                        sizeof(sock->channel)) == sizeof(sock->channel);
 }
@@ -395,7 +395,7 @@ static void on_srv_l2cap_listen_started(tBTA_JV_L2CAP_START* p_start,
   if (!sock->server_psm_sent) {
     if (!send_app_psm_or_chan_l(sock)) {
       // closed
-      LOG_DEBUG("Unable to send socket to application socket_id:%u", sock->id);
+      LOG_INFO("Unable to send socket to application socket_id:%u", sock->id);
       btsock_l2cap_free_l(sock);
     } else {
       sock->server_psm_sent = true;
@@ -497,7 +497,7 @@ static void on_cl_l2cap_psm_connect_l(tBTA_JV_L2CAP_OPEN* p_open,
   // start monitoring the socketpair to get call back when app writing data
   btsock_thread_add_fd(pth, sock->our_fd, BTSOCK_L2CAP, SOCK_THREAD_FD_RD,
                        sock->id);
-  LOG_DEBUG("Connected l2cap socket socket_id:%u", sock->id);
+  LOG_INFO("Connected l2cap socket socket_id:%u", sock->id);
   sock->connected = true;
 }
 
index 78de22f..80a435d 100644 (file)
@@ -304,8 +304,8 @@ bt_status_t btsock_rfc_listen(const char* service_name,
     LOG_ERROR("unable to allocate RFCOMM slot");
     return BT_STATUS_FAIL;
   }
-  LOG_DEBUG("Adding listening socket service_name: %s - channel: %d",
-            service_name, channel);
+  LOG_INFO("Adding listening socket service_name: %s - channel: %d",
+           service_name, channel);
   BTA_JvGetChannelId(BTA_JV_CONN_TYPE_RFCOMM, slot->id, channel);
   *sock_fd = slot->app_fd;  // Transfer ownership of fd to caller.
   /*TODO:
index 5e7cef8..bd8c122 100644 (file)
@@ -521,7 +521,7 @@ static void* sock_poll_thread(void* arg) {
       }
       if (need_process_data_fd) process_data_sock(h, pfds, ret);
     } else {
-      LOG_DEBUG("no data, select ret: %d", ret);
+      LOG_INFO("no data, select ret: %d", ret);
     };
   }
   LOG_INFO("socket poll thread exiting, h:%d", h);
index db0696d..78fce56 100644 (file)
@@ -835,7 +835,7 @@ bt_status_t btif_storage_add_bonded_device(RawAddress* remote_bd_addr,
 bt_status_t btif_storage_remove_bonded_device(
     const RawAddress* remote_bd_addr) {
   std::string bdstr = remote_bd_addr->ToString();
-  LOG_DEBUG("Removing bonded device addr:%s", bdstr.c_str());
+  LOG_INFO("Removing bonded device addr:%s", bdstr.c_str());
 
   btif_storage_remove_ble_bonding_keys(remote_bd_addr);
 
@@ -1128,7 +1128,7 @@ bt_status_t btif_storage_get_ble_bonding_key(const RawAddress& remote_bd_addr,
 bt_status_t btif_storage_remove_ble_bonding_keys(
     const RawAddress* remote_bd_addr) {
   std::string bdstr = remote_bd_addr->ToString();
-  LOG_DEBUG("Removing bonding keys for bd addr:%s", bdstr.c_str());
+  LOG_INFO("Removing bonding keys for bd addr:%s", bdstr.c_str());
   int ret = 1;
   if (btif_config_exist(bdstr, "LE_KEY_PENC"))
     ret &= btif_config_remove(bdstr, "LE_KEY_PENC");
index 03ae0b6..13c5c05 100644 (file)
@@ -53,11 +53,11 @@ bool IsValidHexString(const std::string& str) {
 
 std::optional<std::vector<uint8_t>> FromHexString(const std::string& str) {
   if (str.size() % 2 != 0) {
-    LOG_DEBUG("str size is not divisible by 2, size is %zu", str.size());
+    LOG_INFO("str size is not divisible by 2, size is %zu", str.size());
     return std::nullopt;
   }
   if (std::find_if_not(str.begin(), str.end(), IsHexDigit{}) != str.end()) {
-    LOG_DEBUG("value contains none hex digit");
+    LOG_INFO("value contains none hex digit");
     return std::nullopt;
   }
   std::vector<uint8_t> value;
@@ -66,7 +66,7 @@ std::optional<std::vector<uint8_t>> FromHexString(const std::string& str) {
     uint8_t v = 0;
     auto ret = std::from_chars(str.c_str() + i, str.c_str() + i + 2, v, 16);
     if (std::make_error_code(ret.ec)) {
-      LOG_DEBUG("failed to parse hex char at index %zu", i);
+      LOG_INFO("failed to parse hex char at index %zu", i);
       return std::nullopt;
     }
     value.push_back(v);
@@ -114,15 +114,15 @@ std::optional<int64_t> Int64FromString(const std::string& str) {
   errno = 0;
   int64_t value = std::strtoll(str.c_str(), &ptr, 10);
   if (errno != 0) {
-    LOG_DEBUG("cannot parse string '%s' with error '%s'", str.c_str(), strerror(errno));
+    LOG_INFO("cannot parse string '%s' with error '%s'", str.c_str(), strerror(errno));
     return std::nullopt;
   }
   if (ptr == str.c_str()) {
-    LOG_DEBUG("string '%s' is empty or has wrong format", str.c_str());
+    LOG_INFO("string '%s' is empty or has wrong format", str.c_str());
     return std::nullopt;
   }
   if (ptr != (str.c_str() + str.size())) {
-    LOG_DEBUG("cannot parse whole string '%s'", str.c_str());
+    LOG_INFO("cannot parse whole string '%s'", str.c_str());
     return std::nullopt;
   }
   return value;
@@ -134,22 +134,22 @@ std::string ToString(int64_t value) {
 
 std::optional<uint64_t> Uint64FromString(const std::string& str) {
   if (str.find('-') != std::string::npos) {
-    LOG_DEBUG("string '%s' contains minus sign, this function is for unsigned", str.c_str());
+    LOG_INFO("string '%s' contains minus sign, this function is for unsigned", str.c_str());
     return std::nullopt;
   }
   char* ptr = nullptr;
   errno = 0;
   uint64_t value = std::strtoull(str.c_str(), &ptr, 10);
   if (errno != 0) {
-    LOG_DEBUG("cannot parse string '%s' with error '%s'", str.c_str(), strerror(errno));
+    LOG_INFO("cannot parse string '%s' with error '%s'", str.c_str(), strerror(errno));
     return std::nullopt;
   }
   if (ptr == str.c_str()) {
-    LOG_DEBUG("string '%s' is empty or has wrong format", str.c_str());
+    LOG_INFO("string '%s' is empty or has wrong format", str.c_str());
     return std::nullopt;
   }
   if (ptr != (str.c_str() + str.size())) {
-    LOG_DEBUG("cannot parse whole string '%s'", str.c_str());
+    LOG_INFO("cannot parse whole string '%s'", str.c_str());
     return std::nullopt;
   }
   return value;
@@ -165,7 +165,7 @@ std::optional<bool> BoolFromString(const std::string& str) {
   } else if (str == "false") {
     return false;
   } else {
-    LOG_DEBUG("string '%s' is neither true nor false", str.c_str());
+    LOG_INFO("string '%s' is neither true nor false", str.c_str());
     return std::nullopt;
   }
 }
index 2e0ee53..79afcf8 100644 (file)
@@ -191,7 +191,7 @@ Gabeldorsche uses `printf` style logging with macros defined in `os/log.h`. Five
 log levels are available.
 
 *   LOG_VERBOSE(fmt, args...): Will be disabled by default
-*   LOG_DEBUG(fmt, args...): Will be disabled by default
+*   LOG_INFO(fmt, args...): Will be disabled by default
 *   LOG_INFO(fmt, args...): Enabled
 *   LOG_WARN(fmt, args...): Enabled
 *   LOG_ERROR(fmt, args...): Enabled
index c3be1c7..3a7d881 100644 (file)
@@ -140,7 +140,7 @@ bool internal::FilterTypeInteger(
   }
 
   if (DBG) {
-    LOG_DEBUG(
+    LOG_INFO(
         "Integer Field_name:%s privacy_level:%s old_value:%d / 0x%x ==> new_value:%d\n",
         field.name()->c_str(),
         PrivacyLevelName(privacy_level),
@@ -176,7 +176,7 @@ bool internal::FilterTypeFloat(const reflection::Field& field, flatbuffers::Tabl
       break;
   }
   if (DBG) {
-    LOG_DEBUG(
+    LOG_INFO(
         "Float Field_name:%s privacy_level:%s old_value:%f ==> new_value:%f",
         field.name()->c_str(),
         PrivacyLevelName(privacy_level),
@@ -217,7 +217,7 @@ bool internal::FilterTypeString(const reflection::Field& field, flatbuffers::Tab
       break;
   }
   if (DBG) {
-    LOG_DEBUG(
+    LOG_INFO(
         "%s Field_name:%s size:%u privacy_level:%s old_string:%s ==> new_string:%s",
         __func__,
         field.name()->c_str(),
@@ -239,7 +239,7 @@ bool internal::FilterTypeStruct(const reflection::Field& field, flatbuffers::Tab
     flatbuffers::SetFieldT(table, field, nullptr);
     internal::ScrubFromTable(table, field_offset);
     if (DBG) {
-      LOG_DEBUG(
+      LOG_INFO(
           " Table Removing field name:%s privacy_level:%s", field.name()->c_str(), PrivacyLevelName(privacy_level));
     }
   }
index 3871679..9575b2d 100644 (file)
@@ -55,7 +55,7 @@ class GrpcEventQueue {
     while (!context->IsCancelled()) {
       // Wait for 500 ms so that cancellation can be caught in amortized 250 ms latency
       if (pending_events_.wait_to_take(500ms)) {
-        LOG_DEBUG("%s: Got event after queue", log_name_.c_str());
+        LOG_INFO("%s: Got event after queue", log_name_.c_str());
         writer->Write(pending_events_.take());
       }
     }
@@ -70,10 +70,10 @@ class GrpcEventQueue {
    */
   void OnIncomingEvent(T event) {
     if (!running_) {
-      LOG_DEBUG("%s: Discarding an event while not running the loop", log_name_.c_str());
+      LOG_INFO("%s: Discarding an event while not running the loop", log_name_.c_str());
       return;
     }
-    LOG_DEBUG("%s: Got event before queue", log_name_.c_str());
+    LOG_INFO("%s: Got event before queue", log_name_.c_str());
     pending_events_.push(std::move(event));
   }
 
index 943c6b7..a42c02c 100644 (file)
@@ -378,39 +378,39 @@ class AclManagerFacadeService : public AclManagerFacade::Service, public Connect
     }
 
     void OnMasterLinkKeyComplete(KeyFlag key_flag) override {
-      LOG_DEBUG("key_flag:%s", KeyFlagText(key_flag).c_str());
+      LOG_INFO("key_flag:%s", KeyFlagText(key_flag).c_str());
     }
 
     void OnRoleChange(Role new_role) override {
-      LOG_DEBUG("new_role:%d", (uint8_t)new_role);
+      LOG_INFO("new_role:%d", (uint8_t)new_role);
     }
 
     void OnReadLinkPolicySettingsComplete(uint16_t link_policy_settings) override {
-      LOG_DEBUG("link_policy_settings:%d", link_policy_settings);
+      LOG_INFO("link_policy_settings:%d", link_policy_settings);
     }
 
     void OnConnectionPacketTypeChanged(uint16_t packet_type) override {
-      LOG_DEBUG("OnConnectionPacketTypeChanged packet_type:%d", packet_type);
+      LOG_INFO("OnConnectionPacketTypeChanged packet_type:%d", packet_type);
     }
 
     void OnAuthenticationComplete() override {
-      LOG_DEBUG("OnAuthenticationComplete");
+      LOG_INFO("OnAuthenticationComplete");
     }
 
     void OnEncryptionChange(EncryptionEnabled enabled) override {
-      LOG_DEBUG("OnConnectionPacketTypeChanged enabled:%d", (uint8_t)enabled);
+      LOG_INFO("OnConnectionPacketTypeChanged enabled:%d", (uint8_t)enabled);
     }
 
     void OnChangeConnectionLinkKeyComplete() override {
-      LOG_DEBUG("OnChangeConnectionLinkKeyComplete");
+      LOG_INFO("OnChangeConnectionLinkKeyComplete");
     };
 
     void OnReadClockOffsetComplete(uint16_t clock_offset) override {
-      LOG_DEBUG("OnReadClockOffsetComplete clock_offset:%d", clock_offset);
+      LOG_INFO("OnReadClockOffsetComplete clock_offset:%d", clock_offset);
     };
 
     void OnModeChange(Mode current_mode, uint16_t interval) override {
-      LOG_DEBUG("OnModeChange Mode:%d, interval:%d", (uint8_t)current_mode, interval);
+      LOG_INFO("OnModeChange Mode:%d, interval:%d", (uint8_t)current_mode, interval);
     };
 
     void OnQosSetupComplete(
@@ -419,7 +419,7 @@ class AclManagerFacadeService : public AclManagerFacade::Service, public Connect
         uint32_t peak_bandwidth,
         uint32_t latency,
         uint32_t delay_variation) override {
-      LOG_DEBUG(
+      LOG_INFO(
           "OnQosSetupComplete service_type:%d, token_rate:%d, peak_bandwidth:%d, latency:%d, delay_variation:%d",
           (uint8_t)service_type,
           token_rate,
@@ -435,7 +435,7 @@ class AclManagerFacadeService : public AclManagerFacade::Service, public Connect
         uint32_t token_bucket_size,
         uint32_t peak_bandwidth,
         uint32_t access_latency) override {
-      LOG_DEBUG(
+      LOG_INFO(
           "OnFlowSpecificationComplete flow_direction:%d. service_type:%d, token_rate:%d, token_bucket_size:%d, "
           "peak_bandwidth:%d, access_latency:%d",
           (uint8_t)flow_direction,
@@ -447,47 +447,47 @@ class AclManagerFacadeService : public AclManagerFacade::Service, public Connect
     }
 
     void OnFlushOccurred() override {
-      LOG_DEBUG("OnFlushOccurred");
+      LOG_INFO("OnFlushOccurred");
     }
 
     void OnRoleDiscoveryComplete(Role current_role) override {
-      LOG_DEBUG("OnRoleDiscoveryComplete current_role:%d", (uint8_t)current_role);
+      LOG_INFO("OnRoleDiscoveryComplete current_role:%d", (uint8_t)current_role);
     }
 
     void OnReadAutomaticFlushTimeoutComplete(uint16_t flush_timeout) override {
-      LOG_DEBUG("OnReadAutomaticFlushTimeoutComplete flush_timeout:%d", flush_timeout);
+      LOG_INFO("OnReadAutomaticFlushTimeoutComplete flush_timeout:%d", flush_timeout);
     }
 
     void OnReadTransmitPowerLevelComplete(uint8_t transmit_power_level) override {
-      LOG_DEBUG("OnReadTransmitPowerLevelComplete transmit_power_level:%d", transmit_power_level);
+      LOG_INFO("OnReadTransmitPowerLevelComplete transmit_power_level:%d", transmit_power_level);
     }
 
     void OnReadLinkSupervisionTimeoutComplete(uint16_t link_supervision_timeout) override {
-      LOG_DEBUG("OnReadLinkSupervisionTimeoutComplete link_supervision_timeout:%d", link_supervision_timeout);
+      LOG_INFO("OnReadLinkSupervisionTimeoutComplete link_supervision_timeout:%d", link_supervision_timeout);
     }
 
     void OnReadFailedContactCounterComplete(uint16_t failed_contact_counter) override {
-      LOG_DEBUG("OnReadFailedContactCounterComplete failed_contact_counter:%d", failed_contact_counter);
+      LOG_INFO("OnReadFailedContactCounterComplete failed_contact_counter:%d", failed_contact_counter);
     }
 
     void OnReadLinkQualityComplete(uint8_t link_quality) override {
-      LOG_DEBUG("OnReadLinkQualityComplete link_quality:%d", link_quality);
+      LOG_INFO("OnReadLinkQualityComplete link_quality:%d", link_quality);
     }
 
     void OnReadAfhChannelMapComplete(AfhMode afh_mode, std::array<uint8_t, 10> afh_channel_map) override {
-      LOG_DEBUG("OnReadAfhChannelMapComplete afh_mode:%d", (uint8_t)afh_mode);
+      LOG_INFO("OnReadAfhChannelMapComplete afh_mode:%d", (uint8_t)afh_mode);
     }
 
     void OnReadRssiComplete(uint8_t rssi) override {
-      LOG_DEBUG("OnReadRssiComplete rssi:%d", rssi);
+      LOG_INFO("OnReadRssiComplete rssi:%d", rssi);
     }
 
     void OnReadClockComplete(uint32_t clock, uint16_t accuracy) override {
-      LOG_DEBUG("OnReadClockComplete clock:%d, accuracy:%d", clock, accuracy);
+      LOG_INFO("OnReadClockComplete clock:%d, accuracy:%d", clock, accuracy);
     }
 
     void OnDisconnection(ErrorCode reason) override {
-      LOG_DEBUG("OnDisconnection reason: %s", ErrorCodeText(reason).c_str());
+      LOG_INFO("OnDisconnection reason: %s", ErrorCodeText(reason).c_str());
       std::unique_ptr<BasePacketBuilder> builder =
           DisconnectionCompleteBuilder::Create(ErrorCode::SUCCESS, handle_, reason);
       ConnectionEvent disconnection;
@@ -496,7 +496,7 @@ class AclManagerFacadeService : public AclManagerFacade::Service, public Connect
     }
     void OnReadRemoteVersionInformationComplete(
         uint8_t lmp_version, uint16_t manufacturer_name, uint16_t sub_version) override {
-      LOG_DEBUG(
+      LOG_INFO(
           "OnReadRemoteVersionInformationComplete lmp_version:%hhu manufacturer_name:%hu sub_version:%hu",
           lmp_version,
           manufacturer_name,
index 9d24144..f5fa696 100644 (file)
@@ -216,7 +216,7 @@ class LeAclManagerFacadeService : public LeAclManagerFacade::Service, public LeC
   }
 
   void OnLeConnectSuccess(AddressWithType address_with_type, std::unique_ptr<LeAclConnection> connection) override {
-    LOG_DEBUG("%s", address_with_type.ToString().c_str());
+    LOG_INFO("%s", address_with_type.ToString().c_str());
 
     std::unique_lock<std::mutex> lock(acl_connections_mutex_);
     auto addr = address_with_type.GetAddress();
@@ -267,7 +267,7 @@ class LeAclManagerFacadeService : public LeAclManagerFacade::Service, public LeC
         : handle_(handle), connection_(std::move(connection)), event_stream_(std::move(event_stream)) {}
     void OnConnectionUpdate(
         uint16_t connection_interval, uint16_t connection_latency, uint16_t supervision_timeout) override {
-      LOG_DEBUG(
+      LOG_INFO(
           "interval: 0x%hx, latency: 0x%hx, timeout 0x%hx",
           connection_interval,
           connection_latency,
@@ -275,7 +275,7 @@ class LeAclManagerFacadeService : public LeAclManagerFacade::Service, public LeC
     }
 
     void OnDataLengthChange(uint16_t tx_octets, uint16_t tx_time, uint16_t rx_octets, uint16_t rx_time) override {
-      LOG_DEBUG(
+      LOG_INFO(
           "tx_octets: 0x%hx, tx_time: 0x%hx, rx_octets 0x%hx, rx_time 0x%hx", tx_octets, tx_time, rx_octets, rx_time);
     }
     void OnDisconnection(ErrorCode reason) override {
index a097879..63a6507 100644 (file)
@@ -127,7 +127,7 @@ LeAddressManager::AddressPolicy LeAddressManager::Register(LeAddressManagerCallb
 void LeAddressManager::register_client(LeAddressManagerCallback* callback) {
   registered_clients_.insert(std::pair<LeAddressManagerCallback*, ClientState>(callback, ClientState::RESUMED));
   if (address_policy_ == AddressPolicy::POLICY_NOT_SET) {
-    LOG_DEBUG("address policy isn't set yet, pause clients and return");
+    LOG_INFO("address policy isn't set yet, pause clients and return");
     pause_registered_clients();
     return;
   } else if (
@@ -311,7 +311,7 @@ void LeAddressManager::handle_next_command() {
   for (auto client : registered_clients_) {
     if (client.second != ClientState::PAUSED) {
       // make sure all client paused, if not, this function will be trigger again by ack_pause
-      LOG_DEBUG("waiting for ack_pause, return");
+      LOG_INFO("waiting for ack_pause, return");
       return;
     }
   }
@@ -384,12 +384,12 @@ void LeAddressManager::OnCommandComplete(bluetooth::hci::CommandCompleteView vie
     return;
   }
   std::string op_code = OpCodeText(view.GetCommandOpCode());
-  LOG_DEBUG("Received command complete with op_code %s", op_code.c_str());
+  LOG_INFO("Received command complete with op_code %s", op_code.c_str());
 
   // The command was sent before any client registered, we can make sure all the clients paused when command complete.
   if (view.GetCommandOpCode() == OpCode::LE_SET_RANDOM_ADDRESS &&
       address_policy_ == AddressPolicy::USE_STATIC_ADDRESS) {
-    LOG_DEBUG("Received LE_SET_RANDOM_ADDRESS complete and Address policy is USE_STATIC_ADDRESS, return");
+    LOG_INFO("Received LE_SET_RANDOM_ADDRESS complete and Address policy is USE_STATIC_ADDRESS, return");
     return;
   }
 
index 1ab5034..d575f66 100644 (file)
@@ -71,7 +71,7 @@ void FixedChannelImpl::Acquire() {
     return;
   }
   if (acquired_) {
-    LOG_DEBUG("%s was already acquired", ToString().c_str());
+    LOG_INFO("%s was already acquired", ToString().c_str());
     return;
   }
   acquired_ = true;
@@ -86,7 +86,7 @@ void FixedChannelImpl::Release() {
     return;
   }
   if (!acquired_) {
-    LOG_DEBUG("%s was already released", ToString().c_str());
+    LOG_INFO("%s was already released", ToString().c_str());
     return;
   }
   acquired_ = false;
index 4341a77..9a4a6cc 100644 (file)
@@ -297,7 +297,7 @@ void Link::OnRemoteExtendedFeatureReceived(bool ertm_supported, bool fcs_support
 }
 
 void Link::OnConnectionPacketTypeChanged(uint16_t packet_type) {
-  LOG_DEBUG("UNIMPLEMENTED %s packet_type:%x", __func__, packet_type);
+  LOG_INFO("UNIMPLEMENTED %s packet_type:%x", __func__, packet_type);
 }
 
 void Link::OnAuthenticationComplete() {
@@ -310,69 +310,80 @@ void Link::OnEncryptionChange(hci::EncryptionEnabled enabled) {
 }
 
 void Link::OnChangeConnectionLinkKeyComplete() {
-  LOG_DEBUG("UNIMPLEMENTED %s", __func__);
+  LOG_INFO("UNIMPLEMENTED %s", __func__);
 }
 
 void Link::OnReadClockOffsetComplete(uint16_t clock_offset) {
-  LOG_DEBUG("UNIMPLEMENTED %s clock_offset:%d", __func__, clock_offset);
+  LOG_INFO("UNIMPLEMENTED %s clock_offset:%d", __func__, clock_offset);
 }
 
 void Link::OnModeChange(hci::Mode current_mode, uint16_t interval) {
-  LOG_DEBUG("UNIMPLEMENTED %s mode:%s interval:%d", __func__, hci::ModeText(current_mode).c_str(), interval);
+  LOG_INFO("UNIMPLEMENTED %s mode:%s interval:%d", __func__, hci::ModeText(current_mode).c_str(), interval);
 }
 
 void Link::OnQosSetupComplete(hci::ServiceType service_type, uint32_t token_rate, uint32_t peak_bandwidth,
                               uint32_t latency, uint32_t delay_variation) {
-  LOG_DEBUG("UNIMPLEMENTED %s service_type:%s token_rate:%d peak_bandwidth:%d latency:%d delay_varitation:%d", __func__,
-            hci::ServiceTypeText(service_type).c_str(), token_rate, peak_bandwidth, latency, delay_variation);
+  LOG_INFO(
+      "UNIMPLEMENTED %s service_type:%s token_rate:%d peak_bandwidth:%d latency:%d delay_varitation:%d",
+      __func__,
+      hci::ServiceTypeText(service_type).c_str(),
+      token_rate,
+      peak_bandwidth,
+      latency,
+      delay_variation);
 }
 void Link::OnFlowSpecificationComplete(hci::FlowDirection flow_direction, hci::ServiceType service_type,
                                        uint32_t token_rate, uint32_t token_bucket_size, uint32_t peak_bandwidth,
                                        uint32_t access_latency) {
-  LOG_DEBUG(
+  LOG_INFO(
       "UNIMPLEMENTED %s flow_direction:%s service_type:%s token_rate:%d token_bucket_size:%d peak_bandwidth:%d "
       "access_latency:%d",
-      __func__, hci::FlowDirectionText(flow_direction).c_str(), hci::ServiceTypeText(service_type).c_str(), token_rate,
-      token_bucket_size, peak_bandwidth, access_latency);
+      __func__,
+      hci::FlowDirectionText(flow_direction).c_str(),
+      hci::ServiceTypeText(service_type).c_str(),
+      token_rate,
+      token_bucket_size,
+      peak_bandwidth,
+      access_latency);
 }
 void Link::OnFlushOccurred() {
-  LOG_DEBUG("UNIMPLEMENTED %s", __func__);
+  LOG_INFO("UNIMPLEMENTED %s", __func__);
 }
 void Link::OnRoleDiscoveryComplete(hci::Role current_role) {
-  LOG_DEBUG("UNIMPLEMENTED %s current_role:%s", __func__, hci::RoleText(current_role).c_str());
+  LOG_INFO("UNIMPLEMENTED %s current_role:%s", __func__, hci::RoleText(current_role).c_str());
 }
 void Link::OnReadLinkPolicySettingsComplete(uint16_t link_policy_settings) {
-  LOG_DEBUG("UNIMPLEMENTED %s link_policy_settings:0x%x", __func__, link_policy_settings);
+  LOG_INFO("UNIMPLEMENTED %s link_policy_settings:0x%x", __func__, link_policy_settings);
 }
 void Link::OnReadAutomaticFlushTimeoutComplete(uint16_t flush_timeout) {
-  LOG_DEBUG("UNIMPLEMENTED %s flush_timeout:%d", __func__, flush_timeout);
+  LOG_INFO("UNIMPLEMENTED %s flush_timeout:%d", __func__, flush_timeout);
 }
 void Link::OnReadTransmitPowerLevelComplete(uint8_t transmit_power_level) {
-  LOG_DEBUG("UNIMPLEMENTED %s transmit_power_level:%d", __func__, transmit_power_level);
+  LOG_INFO("UNIMPLEMENTED %s transmit_power_level:%d", __func__, transmit_power_level);
 }
 void Link::OnReadLinkSupervisionTimeoutComplete(uint16_t link_supervision_timeout) {
-  LOG_DEBUG("UNIMPLEMENTED %s link_supervision_timeout:%d", __func__, link_supervision_timeout);
+  LOG_INFO("UNIMPLEMENTED %s link_supervision_timeout:%d", __func__, link_supervision_timeout);
 }
 void Link::OnReadFailedContactCounterComplete(uint16_t failed_contact_counter) {
-  LOG_DEBUG("UNIMPLEMENTED %sfailed_contact_counter:%hu", __func__, failed_contact_counter);
+  LOG_INFO("UNIMPLEMENTED %sfailed_contact_counter:%hu", __func__, failed_contact_counter);
 }
 void Link::OnReadLinkQualityComplete(uint8_t link_quality) {
-  LOG_DEBUG("UNIMPLEMENTED %s link_quality:%hhu", __func__, link_quality);
+  LOG_INFO("UNIMPLEMENTED %s link_quality:%hhu", __func__, link_quality);
 }
 void Link::OnReadAfhChannelMapComplete(hci::AfhMode afh_mode, std::array<uint8_t, 10> afh_channel_map) {
-  LOG_DEBUG("UNIMPLEMENTED %s afh_mode:%s", __func__, hci::AfhModeText(afh_mode).c_str());
+  LOG_INFO("UNIMPLEMENTED %s afh_mode:%s", __func__, hci::AfhModeText(afh_mode).c_str());
 }
 void Link::OnReadRssiComplete(uint8_t rssi) {
-  LOG_DEBUG("UNIMPLEMENTED %s rssi:%hhd", __func__, rssi);
+  LOG_INFO("UNIMPLEMENTED %s rssi:%hhd", __func__, rssi);
 }
 void Link::OnReadClockComplete(uint32_t clock, uint16_t accuracy) {
-  LOG_DEBUG("UNIMPLEMENTED %s clock:%u accuracy:%hu", __func__, clock, accuracy);
+  LOG_INFO("UNIMPLEMENTED %s clock:%u accuracy:%hu", __func__, clock, accuracy);
 }
 void Link::OnMasterLinkKeyComplete(hci::KeyFlag key_flag) {
-  LOG_DEBUG("UNIMPLEMENTED key_flag:%s", hci::KeyFlagText(key_flag).c_str());
+  LOG_INFO("UNIMPLEMENTED key_flag:%s", hci::KeyFlagText(key_flag).c_str());
 }
 void Link::OnRoleChange(hci::Role new_role) {
-  LOG_DEBUG("UNIMPLEMENTED role:%s", hci::RoleText(new_role).c_str());
+  LOG_INFO("UNIMPLEMENTED role:%s", hci::RoleText(new_role).c_str());
 }
 void Link::OnDisconnection(hci::ErrorCode reason) {
   OnAclDisconnected(reason);
@@ -380,7 +391,7 @@ void Link::OnDisconnection(hci::ErrorCode reason) {
 }
 void Link::OnReadRemoteVersionInformationComplete(
     uint8_t lmp_version, uint16_t manufacturer_name, uint16_t sub_version) {
-  LOG_DEBUG(
+  LOG_INFO(
       "UNIMPLEMENTED lmp_version:%hhu manufacturer_name:%hu sub_version:%hu",
       lmp_version,
       manufacturer_name,
index 938be52..a5cac03 100644 (file)
@@ -244,8 +244,10 @@ void LinkManager::OnConnectFail(hci::Address device, hci::ErrorCode reason) {
   auto pending_link = pending_links_.find(device);
   if (pending_link == pending_links_.end()) {
     // There is no pending link, exit
-    LOG_DEBUG("Connection to %s failed without a pending link; reason: %s", device.ToString().c_str(),
-              hci::ErrorCodeText(reason).c_str());
+    LOG_INFO(
+        "Connection to %s failed without a pending link; reason: %s",
+        device.ToString().c_str(),
+        hci::ErrorCodeText(reason).c_str());
     if (pending_dynamic_channels_callbacks_.find(device) != pending_dynamic_channels_callbacks_.end()) {
       for (Link::PendingDynamicChannelConnection& callbacks : pending_dynamic_channels_callbacks_[device]) {
         callbacks.on_fail_callback_.Invoke(DynamicChannelManager::ConnectionResult{
index a37bcf6..386c84e 100644 (file)
@@ -474,7 +474,7 @@ void ClassicSignallingManager::negotiate_configuration(Cid cid, Continuation is_
   if (can_negotiate) {
     send_configuration_request(channel->GetRemoteCid(), std::move(negotiation_config));
   } else {
-    LOG_DEBUG("No suggested parameter received");
+    LOG_INFO("No suggested parameter received");
   }
 }
 
index 3adeb5f..da5dbfa 100644 (file)
@@ -80,7 +80,7 @@ void FixedChannelImpl::Acquire() {
     return;
   }
   if (acquired_) {
-    LOG_DEBUG("%s was already acquired", ToString().c_str());
+    LOG_INFO("%s was already acquired", ToString().c_str());
     return;
   }
   acquired_ = true;
@@ -95,7 +95,7 @@ void FixedChannelImpl::Release() {
     return;
   }
   if (!acquired_) {
-    LOG_DEBUG("%s was already released", ToString().c_str());
+    LOG_INFO("%s was already released", ToString().c_str());
     return;
   }
   acquired_ = false;
index 43b1bb8..ea946b8 100644 (file)
@@ -65,8 +65,8 @@ void Link::OnDisconnection(hci::ErrorCode status) {
 }
 
 void Link::OnConnectionUpdate(uint16_t connection_interval, uint16_t connection_latency, uint16_t supervision_timeout) {
-  LOG_DEBUG("interval %hx latency %hx supervision_timeout %hx", connection_interval, connection_latency,
-            supervision_timeout);
+  LOG_INFO(
+      "interval %hx latency %hx supervision_timeout %hx", connection_interval, connection_latency, supervision_timeout);
   if (update_request_signal_id_ != kInvalidSignalId) {
     hci::ErrorCode result = hci::ErrorCode::SUCCESS;
     if (connection_interval > update_request_interval_max_ || connection_interval < update_request_interval_min_ ||
@@ -84,7 +84,7 @@ void Link::OnConnectionUpdate(uint16_t connection_interval, uint16_t connection_
 }
 
 void Link::OnDataLengthChange(uint16_t tx_octets, uint16_t tx_time, uint16_t rx_octets, uint16_t rx_time) {
-  LOG_DEBUG("tx_octets %hx tx_time %hx rx_octets %hx rx_time %hx", tx_octets, tx_time, rx_octets, rx_time);
+  LOG_INFO("tx_octets %hx tx_time %hx rx_octets %hx rx_time %hx", tx_octets, tx_time, rx_octets, rx_time);
 }
 void Link::Disconnect() {
   acl_connection_->Disconnect(hci::DisconnectReason::REMOTE_USER_TERMINATED_CONNECTION);
index e3eb3d7..b9b83af 100644 (file)
@@ -134,7 +134,7 @@ void LinkManager::OnLeConnectFail(hci::AddressWithType address_with_type, hci::E
   auto pending_link = pending_links_.find(address_with_type);
   if (pending_link == pending_links_.end()) {
     // There is no pending link, exit
-    LOG_DEBUG("Connection to %s failed without a pending link", address_with_type.ToString().c_str());
+    LOG_INFO("Connection to %s failed without a pending link", address_with_type.ToString().c_str());
     return;
   }
   for (auto& pending_fixed_channel_connection : pending_link->second.pending_fixed_channel_connections_) {
index b5192a0..abaa4a7 100644 (file)
@@ -121,14 +121,14 @@ void neighbor::DiscoverabilityModule::impl::Start() {
 
   hci_layer_->EnqueueCommand(
       hci::ReadNumberOfSupportedIacBuilder::Create(), handler_->BindOnceOn(this, &impl::OnCommandComplete));
-  LOG_DEBUG("Started discoverability module");
+  LOG_INFO("Started discoverability module");
 }
 
 void neighbor::DiscoverabilityModule::impl::Dump() const {
-  LOG_DEBUG("Number of supported iacs:%hhd", num_supported_iac_);
-  LOG_DEBUG("Number of current iacs:%zd", laps_.size());
+  LOG_INFO("Number of supported iacs:%hhd", num_supported_iac_);
+  LOG_INFO("Number of current iacs:%zd", laps_.size());
   for (auto it : laps_) {
-    LOG_DEBUG("  discoverability lap:%x", it.lap_);
+    LOG_INFO("  discoverability lap:%x", it.lap_);
   }
 }
 
index 210aefb..dce9be7 100644 (file)
@@ -184,7 +184,7 @@ void neighbor::InquiryModule::impl::OnCommandStatus(hci::CommandStatusView statu
       auto packet = hci::InquiryStatusView::Create(status);
       ASSERT(packet.IsValid());
       if (active_limited_one_shot_ || active_general_one_shot_) {
-        LOG_DEBUG("Inquiry started lap: %s", active_limited_one_shot_ ? "Limited" : "General");
+        LOG_INFO("Inquiry started lap: %s", active_limited_one_shot_ ? "Limited" : "General");
       }
     } break;
 
@@ -199,7 +199,7 @@ void neighbor::InquiryModule::impl::OnEvent(hci::EventPacketView view) {
     case hci::EventCode::INQUIRY_COMPLETE: {
       auto packet = hci::InquiryCompleteView::Create(view);
       ASSERT(packet.IsValid());
-      LOG_DEBUG("inquiry complete");
+      LOG_INFO("inquiry complete");
       active_limited_one_shot_ = false;
       active_general_one_shot_ = false;
       inquiry_callbacks_.complete(packet.GetStatus());
@@ -208,21 +208,21 @@ void neighbor::InquiryModule::impl::OnEvent(hci::EventPacketView view) {
     case hci::EventCode::INQUIRY_RESULT: {
       auto packet = hci::InquiryResultView::Create(view);
       ASSERT(packet.IsValid());
-      LOG_DEBUG("Inquiry result size:%zd num_responses:%zu", packet.size(), packet.GetInquiryResults().size());
+      LOG_INFO("Inquiry result size:%zd num_responses:%zu", packet.size(), packet.GetInquiryResults().size());
       inquiry_callbacks_.result(packet);
     } break;
 
     case hci::EventCode::INQUIRY_RESULT_WITH_RSSI: {
       auto packet = hci::InquiryResultWithRssiView::Create(view);
       ASSERT(packet.IsValid());
-      LOG_DEBUG("Inquiry result with rssi num_responses:%zu", packet.GetInquiryResults().size());
+      LOG_INFO("Inquiry result with rssi num_responses:%zu", packet.GetInquiryResults().size());
       inquiry_callbacks_.result_with_rssi(packet);
     } break;
 
     case hci::EventCode::EXTENDED_INQUIRY_RESULT: {
       auto packet = hci::ExtendedInquiryResultView::Create(view);
       ASSERT(packet.IsValid());
-      LOG_DEBUG(
+      LOG_INFO(
           "Extended inquiry result addr:%s repetition_mode:%s cod:%s clock_offset:%d rssi:%hhd",
           packet.GetAddress().ToString().c_str(),
           hci::PageScanRepetitionModeText(packet.GetPageScanRepetitionMode()).c_str(),
@@ -343,7 +343,7 @@ void neighbor::InquiryModule::impl::Start() {
   EnqueueCommandComplete(hci::ReadInquiryScanTypeBuilder::Create());
   EnqueueCommandCompleteSync(hci::ReadInquiryModeBuilder::Create());
 
-  LOG_DEBUG("Started inquiry module");
+  LOG_INFO("Started inquiry module");
 }
 
 void neighbor::InquiryModule::impl::Stop() {
@@ -353,19 +353,19 @@ void neighbor::InquiryModule::impl::Stop() {
       hci::InquiryModeText(inquiry_mode_).c_str(),
       hci::InquiryScanTypeText(inquiry_scan_type_).c_str());
   LOG_INFO("Inquiry response tx power:%hhd", inquiry_response_tx_power_);
-  LOG_DEBUG("Stopped inquiry module");
+  LOG_INFO("Stopped inquiry module");
 }
 
 void neighbor::InquiryModule::impl::SetInquiryMode(hci::InquiryMode mode) {
   EnqueueCommandComplete(hci::WriteInquiryModeBuilder::Create(mode));
   inquiry_mode_ = mode;
-  LOG_DEBUG("Set inquiry mode:%s", hci::InquiryModeText(mode).c_str());
+  LOG_INFO("Set inquiry mode:%s", hci::InquiryModeText(mode).c_str());
 }
 
 void neighbor::InquiryModule::impl::SetScanActivity(ScanParameters params) {
   EnqueueCommandComplete(hci::WriteInquiryScanActivityBuilder::Create(params.interval, params.window));
   inquiry_scan_ = params;
-  LOG_DEBUG(
+  LOG_INFO(
       "Set scan activity interval:0x%x/%.02fms window:0x%x/%.02fms",
       params.interval,
       ScanIntervalTimeMs(params.interval),
@@ -375,7 +375,7 @@ void neighbor::InquiryModule::impl::SetScanActivity(ScanParameters params) {
 
 void neighbor::InquiryModule::impl::SetScanType(hci::InquiryScanType scan_type) {
   EnqueueCommandComplete(hci::WriteInquiryScanTypeBuilder::Create(scan_type));
-  LOG_DEBUG("Set scan type:%s", hci::InquiryScanTypeText(scan_type).c_str());
+  LOG_INFO("Set scan type:%s", hci::InquiryScanTypeText(scan_type).c_str());
 }
 
 bool neighbor::InquiryModule::impl::HasCallbacks() const {
index ec28e5a..e5dc777 100644 (file)
@@ -155,7 +155,7 @@ void neighbor::NameModule::impl::ReadRemoteNameRequest(
     hci::ClockOffsetValid clock_offset_valid,
     ReadRemoteNameCallback callback,
     os::Handler* handler) {
-  LOG_DEBUG("%s Start read remote name request for %s", __func__, address.ToString().c_str());
+  LOG_INFO("%s Start read remote name request for %s", __func__, address.ToString().c_str());
 
   if (read_callback_handler_map_.find(address) != read_callback_handler_map_.end()) {
     LOG_WARN("Ignoring duplicate read remote name request to:%s", address.ToString().c_str());
@@ -173,7 +173,7 @@ void neighbor::NameModule::impl::ReadRemoteNameRequest(
 
 void neighbor::NameModule::impl::CancelRemoteNameRequest(
     hci::Address address, CancelRemoteNameCallback callback, os::Handler* handler) {
-  LOG_DEBUG("%s Cancel remote name request for %s", __func__, address.ToString().c_str());
+  LOG_INFO("%s Cancel remote name request for %s", __func__, address.ToString().c_str());
 
   if (cancel_callback_handler_map_.find(address) != cancel_callback_handler_map_.end()) {
     LOG_WARN("Ignoring duplicate cancel remote name request to:%s", address.ToString().c_str());
index aeb95a7..2f1d1e2 100644 (file)
@@ -123,8 +123,8 @@ void neighbor::PageModule::impl::Start() {
 }
 
 void neighbor::PageModule::impl::Stop() {
-  LOG_DEBUG("Page scan interval:%hd window:%hd", scan_parameters_.interval, scan_parameters_.window);
-  LOG_DEBUG("Page scan_type:%s", hci::PageScanTypeText(scan_type_).c_str());
+  LOG_INFO("Page scan interval:%hd window:%hd", scan_parameters_.interval, scan_parameters_.window);
+  LOG_INFO("Page scan_type:%s", hci::PageScanTypeText(scan_type_).c_str());
 }
 
 void neighbor::PageModule::impl::SetScanActivity(ScanParameters params) {
@@ -134,7 +134,7 @@ void neighbor::PageModule::impl::SetScanActivity(ScanParameters params) {
 
   hci_layer_->EnqueueCommand(
       hci::ReadPageScanActivityBuilder::Create(), handler_->BindOnceOn(this, &impl::OnCommandComplete));
-  LOG_DEBUG(
+  LOG_INFO(
       "Set page scan activity interval:0x%x/%.02fms window:0x%x/%.02fms",
       params.interval,
       ScanIntervalTimeMs(params.interval),
@@ -152,7 +152,7 @@ void neighbor::PageModule::impl::SetScanType(hci::PageScanType scan_type) {
 
   hci_layer_->EnqueueCommand(
       hci::ReadPageScanTypeBuilder::Create(), handler_->BindOnceOn(this, &impl::OnCommandComplete));
-  LOG_DEBUG("Set page scan type:%s", hci::PageScanTypeText(scan_type).c_str());
+  LOG_INFO("Set page scan type:%s", hci::PageScanTypeText(scan_type).c_str());
 }
 
 void neighbor::PageModule::impl::SetTimeout(PageTimeout timeout) {
@@ -161,7 +161,7 @@ void neighbor::PageModule::impl::SetTimeout(PageTimeout timeout) {
 
   hci_layer_->EnqueueCommand(
       hci::ReadPageTimeoutBuilder::Create(), handler_->BindOnceOn(this, &impl::OnCommandComplete));
-  LOG_DEBUG("Set page scan timeout:0x%x/%.02fms", timeout, PageTimeoutMs(timeout));
+  LOG_INFO("Set page scan timeout:0x%x/%.02fms", timeout, PageTimeoutMs(timeout));
 }
 
 /**
index 45a7748..66bc4cc 100644 (file)
@@ -156,7 +156,7 @@ void neighbor::ScanModule::impl::Start() {
 }
 
 void neighbor::ScanModule::impl::Stop() {
-  LOG_DEBUG("inquiry scan enabled:%d page scan enabled:%d", inquiry_scan_enabled_, page_scan_enabled_);
+  LOG_INFO("inquiry scan enabled:%d page scan enabled:%d", inquiry_scan_enabled_, page_scan_enabled_);
 }
 
 neighbor::ScanModule::ScanModule() : pimpl_(std::make_unique<impl>(*this)) {}
index 997b537..fd53979 100644 (file)
@@ -439,7 +439,7 @@ void PacketDef::GenTestDefine(std::ostream& s) const {
   s << "void CompareBytes(std::vector<uint8_t> captured_packet) {";
   s << name_ << "View view = " << name_ << "View::FromBytes(captured_packet);";
   s << "if (!view.IsValid()) { LOG_INFO(\"Invalid Packet Bytes (size = %zu)\", view.size());";
-  s << "for (size_t i = 0; i < view.size(); i++) { LOG_DEBUG(\"%5zd:%02X\", i, *(view.begin() + i)); }}";
+  s << "for (size_t i = 0; i < view.size(); i++) { LOG_INFO(\"%5zd:%02X\", i, *(view.begin() + i)); }}";
   s << "ASSERT_TRUE(view.IsValid());";
   s << "auto packet = " << name_ << "Builder::FromView(view);";
   s << "std::shared_ptr<std::vector<uint8_t>> packet_bytes = std::make_shared<std::vector<uint8_t>>();";
index fce2f68..cebee87 100644 (file)
@@ -210,7 +210,7 @@ class SecurityManagerChannelCallback : public ISecurityManagerChannelListener {
   }
 
   void OnConnectionClosed(hci::Address address) override {
-    LOG_DEBUG("Called");
+    LOG_INFO("Called");
   }
 
   void OnEncryptionChange(hci::Address address, bool encrypted) override {}
index 1d97d2b..2d06734 100644 (file)
@@ -318,7 +318,7 @@ void SecurityManagerImpl::OnHciEventReceived(hci::EventPacketView packet) {
 void SecurityManagerImpl::OnConnectionClosed(hci::Address address) {
   auto entry = pairing_handler_map_.find(address);
   if (entry != pairing_handler_map_.end()) {
-    LOG_DEBUG("Cancelling pairing handler for '%s'", address.ToString().c_str());
+    LOG_INFO("Cancelling pairing handler for '%s'", address.ToString().c_str());
     entry->second->Cancel();
   }
   auto record = security_database_.FindOrCreate(hci::AddressWithType(address, hci::AddressType::PUBLIC_DEVICE_ADDRESS));
index ba95a5a..67e6296 100644 (file)
@@ -87,7 +87,7 @@ void ClassicPairingHandler::OnPasskeyEntry(const bluetooth::hci::AddressWithType
 void ClassicPairingHandler::Initiate(bool locally_initiated, hci::IoCapability io_capability,
                                      hci::OobDataPresent oob_present,
                                      hci::AuthenticationRequirements auth_requirements) {
-  LOG_DEBUG("Initiate");
+  LOG_INFO("Initiate");
   locally_initiated_ = locally_initiated;
   local_io_capability_ = io_capability;
   local_oob_present_ = oob_present;
index cac2ab6..fcfb94d 100644 (file)
@@ -122,7 +122,7 @@ class SecurityManagerChannelCallback : public ISecurityManagerChannelListener {
   }
 
   void OnConnectionClosed(hci::Address address) override {
-    LOG_DEBUG("Called");
+    LOG_INFO("Called");
   }
 
   void OnEncryptionChange(hci::Address address, bool encrypted) override {}
index 2a88e7e..4811194 100644 (file)
@@ -127,7 +127,7 @@ class ConnectionInterface {
   }
 
   void Write(std::unique_ptr<packet::RawBuilder> packet) {
-    LOG_DEBUG("Writing packet cid:%hd size:%zd", cid_, packet->size());
+    LOG_INFO("Writing packet cid:%hd size:%zd", cid_, packet->size());
     write_queue_.push(std::move(packet));
     if (!enqueue_registered_) {
       enqueue_registered_ = true;
@@ -146,7 +146,7 @@ class ConnectionInterface {
   }
 
   void OnConnectionClosed(hci::ErrorCode error_code) {
-    LOG_DEBUG(
+    LOG_INFO(
         "Channel interface closed reason:%s cid:%hd device:%s",
         hci::ErrorCodeText(error_code).c_str(),
         cid_,
@@ -210,7 +210,7 @@ class ConnectionInterfaceManager {
       ConnectionInterfaceDescriptor cid,
       l2cap::Cid remote_cid) {
     hci::Address address = cid_to_interface_map_[cid]->GetRemoteAddress();
-    LOG_DEBUG("Connection opened address:%s psm:%hd cid:%hd", address.ToString().c_str(), psm, cid);
+    LOG_INFO("Connection opened address:%s psm:%hd cid:%hd", address.ToString().c_str(), psm, cid);
     on_complete(
         address.ToString(),
         static_cast<uint16_t>(psm),
@@ -221,7 +221,7 @@ class ConnectionInterfaceManager {
 
   void ConnectionFailed(
       ConnectionCompleteCallback on_complete, hci::Address address, l2cap::Psm psm, ConnectionInterfaceDescriptor cid) {
-    LOG_DEBUG("Connection failed address:%s psm:%hd", address.ToString().c_str(), psm);
+    LOG_INFO("Connection failed address:%s psm:%hd", address.ToString().c_str(), psm);
     on_complete(address.ToString(), static_cast<uint16_t>(psm), static_cast<uint16_t>(cid), 0, kConnectionFailed);
   }
 
@@ -285,7 +285,7 @@ void ConnectionInterfaceManager::AddConnection(
       cid,
       std::make_unique<ConnectionInterface>(
           cid, std::move(channel), handler_, [this](ConnectionInterfaceDescriptor cid) {
-            LOG_DEBUG("Deleting connection interface cid:%hd", cid);
+            LOG_INFO("Deleting connection interface cid:%hd", cid);
             auto connection = std::move(cid_to_interface_map_.at(cid));
             handler_->Post(common::BindOnce(
                 &ConnectionInterfaceManager::ConnectionClosed, common::Unretained(this), cid, std::move(connection)));
@@ -341,36 +341,35 @@ class PendingConnection {
         pending_fail_(pending_fail) {}
 
   void OnConnectionOpen(std::unique_ptr<l2cap::classic::DynamicChannel> channel) {
-    LOG_DEBUG("Local initiated connection is open to device:%s for psm:%hd", address_.ToString().c_str(), psm_);
+    LOG_INFO("Local initiated connection is open to device:%s for psm:%hd", address_.ToString().c_str(), psm_);
     ASSERT_LOG(
         address_ == channel->GetDevice().GetAddress(), " Expected remote device does not match actual remote device");
     pending_open_(std::move(channel));
   }
 
   void OnConnectionFailure(l2cap::classic::DynamicChannelManager::ConnectionResult result) {
-    LOG_DEBUG("Connection failed to device:%s for psm:%hd", address_.ToString().c_str(), psm_);
+    LOG_INFO("Connection failed to device:%s for psm:%hd", address_.ToString().c_str(), psm_);
     switch (result.connection_result_code) {
       case l2cap::classic::DynamicChannelManager::ConnectionResultCode::SUCCESS:
         LOG_WARN("Connection failed result:success hci:%s", hci::ErrorCodeText(result.hci_error).c_str());
         break;
       case l2cap::classic::DynamicChannelManager::ConnectionResultCode::FAIL_NO_SERVICE_REGISTERED:
-        LOG_DEBUG(
-            "Connection failed result:no service registered hci:%s", hci::ErrorCodeText(result.hci_error).c_str());
+        LOG_INFO("Connection failed result:no service registered hci:%s", hci::ErrorCodeText(result.hci_error).c_str());
         break;
       case l2cap::classic::DynamicChannelManager::ConnectionResultCode::FAIL_HCI_ERROR:
-        LOG_DEBUG("Connection failed result:hci error hci:%s", hci::ErrorCodeText(result.hci_error).c_str());
+        LOG_INFO("Connection failed result:hci error hci:%s", hci::ErrorCodeText(result.hci_error).c_str());
         break;
       case l2cap::classic::DynamicChannelManager::ConnectionResultCode::FAIL_L2CAP_ERROR:
-        LOG_DEBUG(
+        LOG_INFO(
             "Connection failed result:l2cap error hci:%s l2cap:%s",
             hci::ErrorCodeText(result.hci_error).c_str(),
             l2cap::ConnectionResponseResultText(result.l2cap_connection_response_result).c_str());
         break;
       case l2cap::classic::DynamicChannelManager::ConnectionResultCode::FAIL_REMOTE_NOT_SUPPORT:
-        LOG_DEBUG("Connection failed result:Remote not support required retransmission and flow control mode");
+        LOG_INFO("Connection failed result:Remote not support required retransmission and flow control mode");
         break;
       case l2cap::classic::DynamicChannelManager::ConnectionResultCode::FAIL_SECURITY_BLOCK:
-        LOG_DEBUG("Connection failed result:security block");
+        LOG_INFO("Connection failed result:security block");
         break;
     }
     pending_fail_(result);
@@ -478,7 +477,7 @@ void L2cap::impl::RegisterService(
             std::unique_ptr<l2cap::classic::DynamicChannelService> service_ = std::move(service);
             switch (result) {
               case l2cap::classic::DynamicChannelManager::RegistrationResult::SUCCESS:
-                LOG_DEBUG("Service is registered for psm:%hd", service_->GetPsm());
+                LOG_INFO("Service is registered for psm:%hd", service_->GetPsm());
                 register_promise.set_value(service_->GetPsm());
                 psm_to_service_interface_map_->emplace(service_->GetPsm(), std::move(service_));
                 break;
@@ -499,13 +498,13 @@ void L2cap::impl::RegisterService(
              ConnectionCompleteCallback on_complete,
              ConnectionInterfaceManager* connection_interface_manager_,
              std::unique_ptr<l2cap::classic::DynamicChannel> channel) {
-            LOG_DEBUG("Remote initiated connection is open from device:%s", channel->GetDevice().ToString().c_str());
+            LOG_INFO("Remote initiated connection is open from device:%s", channel->GetDevice().ToString().c_str());
 
             ConnectionInterfaceDescriptor cid = connection_interface_manager_->AllocateConnectionInterfaceDescriptor();
             uint16_t remote_cid = channel->HACK_GetRemoteCid();
             connection_interface_manager_->AddConnection(cid, std::move(channel));
             connection_interface_manager_->ConnectionOpened(on_complete, psm, cid, remote_cid);
-            LOG_DEBUG("connection open");
+            LOG_INFO("connection open");
           },
           psm,
           on_complete,
index 82c5144..fb897d5 100644 (file)
@@ -269,7 +269,7 @@ void ConfigCache::RemoveSectionWithProperty(const std::string& property) {
   for (auto* config_section : {&information_sections_, &persistent_devices_}) {
     for (auto it = config_section->begin(); it != config_section->end();) {
       if (it->second.contains(property)) {
-        LOG_DEBUG("Removing persistent section %s with property %s", it->first.c_str(), property.c_str());
+        LOG_INFO("Removing persistent section %s with property %s", it->first.c_str(), property.c_str());
         it = config_section->erase(it);
         num_persistent_removed++;
         continue;
@@ -279,7 +279,7 @@ void ConfigCache::RemoveSectionWithProperty(const std::string& property) {
   }
   for (auto it = temporary_devices_.begin(); it != temporary_devices_.end();) {
     if (it->second.contains(property)) {
-      LOG_DEBUG("Removing temporary section %s with property %s", it->first.c_str(), property.c_str());
+      LOG_INFO("Removing temporary section %s with property %s", it->first.c_str(), property.c_str());
       it = temporary_devices_.erase(it);
       continue;
     }
index cad4de1..9bfacf9 100644 (file)
@@ -252,7 +252,7 @@ static future_t* hci_module_start_up(void) {
 
   hci_thread.DoInThread(FROM_HERE, base::Bind(&hci_initialize));
 
-  LOG_DEBUG("%s starting async portion", __func__);
+  LOG_INFO("%s starting async portion", __func__);
   return local_startup_future;
 
 error:
index b82969a..6353266 100644 (file)
@@ -44,7 +44,7 @@ void bte_load_did_conf(const char* p_path) {
     snprintf(section_name, sizeof(section_name), "DID%d", i);
 
     if (!config_has_section(*config, section_name)) {
-      LOG_DEBUG("%s no section named %s.", __func__, section_name);
+      LOG_INFO("%s no section named %s.", __func__, section_name);
       break;
     }
 
@@ -80,15 +80,15 @@ void bte_load_did_conf(const char* p_path) {
       continue;
     }
 
-    LOG_DEBUG("Device ID record %d : %s", i,
-              (record.primary_record ? "primary" : "not primary"));
-    LOG_DEBUG("  vendorId            = %04x", record.vendor);
-    LOG_DEBUG("  vendorIdSource      = %04x", record.vendor_id_source);
-    LOG_DEBUG("  product             = %04x", record.product);
-    LOG_DEBUG("  version             = %04x", record.version);
-    LOG_DEBUG("  clientExecutableURL = %s", record.client_executable_url);
-    LOG_DEBUG("  serviceDescription  = %s", record.service_description);
-    LOG_DEBUG("  documentationURL    = %s", record.documentation_url);
+    LOG_INFO("Device ID record %d : %s", i,
+             (record.primary_record ? "primary" : "not primary"));
+    LOG_INFO("  vendorId            = %04x", record.vendor);
+    LOG_INFO("  vendorIdSource      = %04x", record.vendor_id_source);
+    LOG_INFO("  product             = %04x", record.product);
+    LOG_INFO("  version             = %04x", record.version);
+    LOG_INFO("  clientExecutableURL = %s", record.client_executable_url);
+    LOG_INFO("  serviceDescription  = %s", record.service_description);
+    LOG_INFO("  documentationURL    = %s", record.documentation_url);
 
     uint32_t record_handle;
     tBTA_STATUS status = BTA_DmSetLocalDiRecord(&record, &record_handle);
index 71f6f4b..bdc7069 100644 (file)
@@ -196,7 +196,7 @@ void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {
       LOG_INFO("%s", buffer);
       break;
     case TRACE_TYPE_DEBUG:
-      LOG_DEBUG("%s", buffer);
+      LOG_INFO("%s", buffer);
       break;
     default:
       /* we should never get this */
index 58dfaf3..db88ee9 100644 (file)
@@ -186,7 +186,7 @@ class ClassicShimAclConnection
   void OnReadRemoteVersionInformationComplete(uint8_t lmp_version,
                                               uint16_t manufacturer_name,
                                               uint16_t sub_version) override {
-    LOG_DEBUG(
+    LOG_INFO(
         "UNIMPLEMENTED lmp_version:%hhu manufacturer_name:%hu sub_version:%hu",
         lmp_version, manufacturer_name, sub_version);
   }
@@ -274,15 +274,15 @@ void bluetooth::shim::legacy::Acl::WriteData(
 
 void bluetooth::shim::legacy::Acl::CreateClassicConnection(
     const bluetooth::hci::Address& address) {
-  LOG_DEBUG("%s Initiate the creation of a classic connection %s", __func__,
-            address.ToString().c_str());
+  LOG_INFO("%s Initiate the creation of a classic connection %s", __func__,
+           address.ToString().c_str());
   GetAclManager()->CreateConnection(address);
 }
 
 void bluetooth::shim::legacy::Acl::CreateLeConnection(
     const bluetooth::hci::AddressWithType& address_with_type) {
-  LOG_DEBUG("%s Initiate the creation of a le connection %s", __func__,
-            address_with_type.ToString().c_str());
+  LOG_INFO("%s Initiate the creation of a le connection %s", __func__,
+           address_with_type.ToString().c_str());
   GetAclManager()->CreateLeConnection(address_with_type);
 }
 
@@ -297,8 +297,8 @@ void bluetooth::shim::legacy::Acl::OnConnectSuccess(
                   handler_, std::move(connection)));
   pimpl_->handle_to_classic_connection_map_[handle]->RegisterCallbacks();
 
-  LOG_DEBUG("%s Classic ACL created successfully peer:%s", __func__,
-            bd_addr.ToString().c_str());
+  LOG_INFO("%s Classic ACL created successfully peer:%s", __func__,
+           bd_addr.ToString().c_str());
   btm_acl_connected(bd_addr, handle, HCI_SUCCESS, false);
 }
 
@@ -322,8 +322,8 @@ void bluetooth::shim::legacy::Acl::OnLeConnectSuccess(
       std::make_unique<LeShimAclConnection>(handler_, std::move(connection)));
   pimpl_->handle_to_le_connection_map_[handle]->RegisterCallbacks();
 
-  LOG_DEBUG("%s Le ACL created successfully peer:%s", __func__,
-            address_with_type.ToString().c_str());
+  LOG_INFO("%s Le ACL created successfully peer:%s", __func__,
+           address_with_type.ToString().c_str());
 
   tBLE_BD_ADDR legacy_address_with_type =
       ToLegacyAddressWithType(address_with_type);
index d56ef95..8d4e8aa 100644 (file)
@@ -363,7 +363,7 @@ bool Btm::StartInquiry(
     LegacyInquiryCompleteCallback legacy_inquiry_complete_callback) {
   switch (mode) {
     case kInquiryModeOff:
-      LOG_DEBUG("%s Stopping inquiry mode", __func__);
+      LOG_INFO("%s Stopping inquiry mode", __func__);
       if (limited_inquiry_active_ || general_inquiry_active_) {
         GetInquiry()->StopInquiry();
         limited_inquiry_active_ = false;
@@ -375,7 +375,7 @@ bool Btm::StartInquiry(
     case kLimitedInquiryMode:
     case kGeneralInquiryMode: {
       if (mode == kLimitedInquiryMode) {
-        LOG_DEBUG(
+        LOG_INFO(
 
             "%s Starting limited inquiry mode duration:%hhd max responses:%hhd",
             __func__, duration, max_responses);
@@ -383,7 +383,7 @@ bool Btm::StartInquiry(
         GetInquiry()->StartLimitedInquiry(duration, max_responses);
         active_inquiry_mode_ = kLimitedInquiryMode;
       } else {
-        LOG_DEBUG(
+        LOG_INFO(
 
             "%s Starting general inquiry mode duration:%hhd max responses:%hhd",
             __func__, duration, max_responses);
@@ -401,7 +401,7 @@ bool Btm::StartInquiry(
 }
 
 void Btm::CancelInquiry() {
-  LOG_DEBUG("%s", __func__);
+  LOG_INFO("%s", __func__);
   if (limited_inquiry_active_ || general_inquiry_active_) {
     GetInquiry()->StopInquiry();
     limited_inquiry_active_ = false;
@@ -434,12 +434,12 @@ bool Btm::StartPeriodicInquiry(uint8_t mode, uint8_t duration,
     case kLimitedInquiryMode:
     case kGeneralInquiryMode: {
       if (mode == kLimitedInquiryMode) {
-        LOG_DEBUG("%s Starting limited periodic inquiry mode", __func__);
+        LOG_INFO("%s Starting limited periodic inquiry mode", __func__);
         limited_periodic_inquiry_active_ = true;
         GetInquiry()->StartLimitedPeriodicInquiry(duration, max_responses,
                                                   max_delay, min_delay);
       } else {
-        LOG_DEBUG("%s Starting general periodic inquiry mode", __func__);
+        LOG_INFO("%s Starting general periodic inquiry mode", __func__);
         general_periodic_inquiry_active_ = true;
         GetInquiry()->StartGeneralPeriodicInquiry(duration, max_responses,
                                                   max_delay, min_delay);
@@ -587,8 +587,8 @@ BtmStatus Btm::ReadClassicRemoteDeviceName(const RawAddress& raw_address,
     return BTM_BUSY;
   }
 
-  LOG_DEBUG("%s Start read name from address:%s", __func__,
-            raw_address.ToString().c_str());
+  LOG_INFO("%s Start read name from address:%s", __func__,
+           raw_address.ToString().c_str());
   GetName()->ReadRemoteNameRequest(
       ToGdAddress(raw_address), hci::PageScanRepetitionMode::R1,
       0 /* clock_offset */, hci::ClockOffsetValid::INVALID,
@@ -608,8 +608,8 @@ BtmStatus Btm::ReadClassicRemoteDeviceName(const RawAddress& raw_address,
             };
             std::copy(remote_name.begin(), remote_name.end(),
                       name.remote_bd_name);
-            LOG_DEBUG("%s Finish read name from address:%s name:%s", __func__,
-                      address.ToString().c_str(), name.remote_bd_name);
+            LOG_INFO("%s Finish read name from address:%s name:%s", __func__,
+                     address.ToString().c_str(), name.remote_bd_name);
             callback(&name);
             classic_read_remote_name->Stop();
           },
@@ -675,7 +675,7 @@ void Btm::StartAdvertising() {
     LOG_WARN("%s Unable to start advertising", __func__);
     return;
   }
-  LOG_DEBUG("%s Started advertising", __func__);
+  LOG_INFO("%s Started advertising", __func__);
 }
 
 void Btm::StopAdvertising() {
@@ -685,7 +685,7 @@ void Btm::StopAdvertising() {
   }
   GetAdvertising()->RemoveAdvertiser(advertiser_id_);
   advertiser_id_ = hci::LeAdvertisingManager::kInvalidId;
-  LOG_DEBUG("%s Stopped advertising", __func__);
+  LOG_INFO("%s Stopped advertising", __func__);
 }
 
 void Btm::StartConnectability() { StartAdvertising(); }
@@ -734,7 +734,7 @@ tBTM_STATUS Btm::CreateBond(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
     } else if (device_type & BT_DEVICE_TYPE_BREDR) {
       transport = BT_TRANSPORT_BR_EDR;
     }
-    LOG_DEBUG("%s guessing transport as %02x ", __func__, transport);
+    LOG_INFO("%s guessing transport as %02x ", __func__, transport);
   }
 
   auto security_manager = GetSecurityModule()->GetSecurityManager();
index 14dba56..fa96567 100644 (file)
@@ -542,8 +542,8 @@ tBTM_STATUS bluetooth::shim::BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb,
   if (!Stack::GetInstance()->GetBtm()->StartInquiry(
           classic_mode, inqparms.duration, 0,
           [](uint16_t status, uint8_t inquiry_mode) {
-            LOG_DEBUG("%s Inquiry is complete status:%hd inquiry_mode:%hhd",
-                      __func__, status, inquiry_mode);
+            LOG_INFO("%s Inquiry is complete status:%hd inquiry_mode:%hhd",
+                     __func__, status, inquiry_mode);
             btm_cb.btm_inq_vars.inqparms.mode &= ~(inquiry_mode);
 
             btm_acl_update_inquiry_status(BTM_INQUIRY_COMPLETE);
@@ -568,8 +568,8 @@ tBTM_STATUS bluetooth::shim::BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb,
               btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr;
 
               if (btm_cb.btm_inq_vars.p_inq_cmpl_cb != nullptr) {
-                LOG_DEBUG("%s Sending inquiry completion to upper layer",
-                          __func__);
+                LOG_INFO("%s Sending inquiry completion to upper layer",
+                         __func__);
                 (btm_cb.btm_inq_vars.p_inq_cmpl_cb)(
                     (tBTM_INQUIRY_CMPL*)&btm_cb.btm_inq_vars.inq_cmpl_info);
                 btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr;
@@ -657,7 +657,7 @@ tBTM_STATUS bluetooth::shim::BTM_BleObserve(bool start, uint8_t duration_sec,
     if (duration_sec != 0) {
       Stack::GetInstance()->GetBtm()->SetObservingTimer(
           duration_sec * 1000, common::BindOnce([]() {
-            LOG_DEBUG("%s observing timeout popped", __func__);
+            LOG_INFO("%s observing timeout popped", __func__);
 
             Stack::GetInstance()->GetBtm()->CancelObservingTimer();
             Stack::GetInstance()->GetBtm()->StopObserving();
@@ -777,7 +777,7 @@ uint16_t bluetooth::shim::BTM_IsInquiryActive(void) {
 }
 
 void bluetooth::shim::BTM_CancelInquiry(void) {
-  LOG_DEBUG("%s Cancel inquiry", __func__);
+  LOG_INFO("%s Cancel inquiry", __func__);
   Stack::GetInstance()->GetBtm()->CancelInquiry();
 
   btm_cb.btm_inq_vars.state = BTM_INQ_INACTIVE_STATE;
@@ -807,8 +807,7 @@ void bluetooth::shim::BTM_CancelInquiry(void) {
     btm_cb.btm_inq_vars.inq_counter++;
 
     if (btm_cb.btm_inq_vars.p_inq_cmpl_cb != nullptr) {
-      LOG_DEBUG("%s Sending cancel inquiry completion to upper layer",
-                __func__);
+      LOG_INFO("%s Sending cancel inquiry completion to upper layer", __func__);
       (btm_cb.btm_inq_vars.p_inq_cmpl_cb)(
           (tBTM_INQUIRY_CMPL*)&btm_cb.btm_inq_vars.inq_cmpl_info);
       btm_cb.btm_inq_vars.p_inq_cmpl_cb = nullptr;
@@ -1197,7 +1196,7 @@ tBTM_STATUS bluetooth::shim::BTM_SecBond(const RawAddress& bd_addr,
 
 bool bluetooth::shim::BTM_SecRegister(const tBTM_APPL_INFO* bta_callbacks) {
   CHECK(bta_callbacks != nullptr);
-  LOG_DEBUG("%s Registering security application", __func__);
+  LOG_INFO("%s Registering security application", __func__);
 
   if (bta_callbacks->p_pin_callback == nullptr) {
     LOG_INFO("UNIMPLEMENTED %s pin_callback", __func__);
index b2ff1c1..01124ea 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_DEBUG("Received cmd complete for %s",
-            bluetooth::hci::OpCodeText(view.GetCommandOpCode()).c_str());
+  LOG_INFO("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_DEBUG("Received cmd status %s for %s",
-            bluetooth::hci::ErrorCodeText(view.GetStatus()).c_str(),
-            bluetooth::hci::OpCodeText(view.GetCommandOpCode()).c_str());
+  LOG_INFO("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);
 }
index 15e2b4d..de0ee39 100644 (file)
@@ -171,7 +171,7 @@ uint16_t bluetooth::shim::legacy::L2cap::RegisterService(
     LOG_INFO("Disable snooping on psm basis unsupported psm:%d", psm);
   }
 
-  LOG_DEBUG("Registering service on psm:%hd", psm);
+  LOG_INFO("Registering service on psm:%hd", psm);
   RegisterServicePromise register_promise;
   auto service_registered = register_promise.get_future();
   bool use_ertm = false;
@@ -191,7 +191,7 @@ uint16_t bluetooth::shim::legacy::L2cap::RegisterService(
   if (registered_psm != psm) {
     LOG_WARN("Unable to register psm:%hd", psm);
   } else {
-    LOG_DEBUG("Successfully registered psm:%hd", psm);
+    LOG_INFO("Successfully registered psm:%hd", psm);
     Classic().RegisterPsm(registered_psm, callbacks);
   }
   return registered_psm;
@@ -209,7 +209,7 @@ void bluetooth::shim::legacy::L2cap::UnregisterService(uint16_t psm) {
     }
   }
 
-  LOG_DEBUG("Unregistering service on psm:%hd", psm);
+  LOG_INFO("Unregistering service on psm:%hd", psm);
   UnregisterServicePromise unregister_promise;
   auto service_unregistered = unregister_promise.get_future();
   bluetooth::shim::GetL2cap()->UnregisterClassicService(
@@ -227,8 +227,8 @@ uint16_t bluetooth::shim::legacy::L2cap::CreateConnection(
 
   CreateConnectionPromise create_promise;
   auto created = create_promise.get_future();
-  LOG_DEBUG("Initiating local connection to psm:%hd address:%s", psm,
-            raw_address.ToString().c_str());
+  LOG_INFO("Initiating local connection to psm:%hd address:%s", psm,
+           raw_address.ToString().c_str());
 
   bluetooth::shim::GetL2cap()->CreateClassicConnection(
       psm, raw_address.ToString(),
@@ -243,7 +243,7 @@ uint16_t bluetooth::shim::legacy::L2cap::CreateConnection(
     LOG_WARN("Failed to initiate connection interface to psm:%hd address:%s",
              psm, raw_address.ToString().c_str());
   } else {
-    LOG_DEBUG(
+    LOG_INFO(
         "Successfully initiated connection to psm:%hd address:%s"
         " connection_interface_descriptor:%hd",
         psm, raw_address.ToString().c_str(), cid);
@@ -275,12 +275,12 @@ void bluetooth::shim::legacy::L2cap::OnLocalInitiatedConnectionCreated(
                    L2CAP_INITIATOR_LOCAL, base::Unretained(&cfg_info)));
 
   } else {
-    LOG_DEBUG("Connection Closed before presentation to upper layer");
+    LOG_INFO("Connection Closed before presentation to upper layer");
     if (connected) {
       SetDownstreamCallbacks(cid);
       bluetooth::shim::GetL2cap()->CloseClassicConnection(cid);
     } else {
-      LOG_DEBUG("Connection failed after initiator closed");
+      LOG_INFO("Connection failed after initiator closed");
     }
   }
 }
@@ -291,7 +291,7 @@ void bluetooth::shim::legacy::L2cap::OnRemoteInitiatedConnectionCreated(
   RawAddress raw_address;
   RawAddress::FromString(string_address, raw_address);
 
-  LOG_DEBUG(
+  LOG_INFO(
       "Sending connection indicator to upper stack from device:%s "
       "psm:%hd cid:%hd",
       string_address.c_str(), psm, cid);
@@ -318,7 +318,7 @@ bool bluetooth::shim::legacy::L2cap::Write(uint16_t cid, BT_HDR* bt_hdr) {
   if (!ConnectionExists(cid) || len == 0) {
     return false;
   }
-  LOG_DEBUG("Writing data cid:%hd len:%zd", cid, len);
+  LOG_INFO("Writing data cid:%hd len:%zd", cid, len);
   bluetooth::shim::GetL2cap()->Write(cid, data, len);
   return true;
 }
@@ -326,7 +326,7 @@ bool bluetooth::shim::legacy::L2cap::Write(uint16_t cid, BT_HDR* bt_hdr) {
 void bluetooth::shim::legacy::L2cap::SetDownstreamCallbacks(uint16_t cid) {
   bluetooth::shim::GetL2cap()->SetReadDataReadyCallback(
       cid, [this](uint16_t cid, std::vector<const uint8_t> data) {
-        LOG_DEBUG("OnDataReady cid:%hd len:%zd", cid, data.size());
+        LOG_INFO("OnDataReady cid:%hd len:%zd", cid, data.size());
         BT_HDR* bt_hdr =
             static_cast<BT_HDR*>(osi_calloc(data.size() + kBtHdrSize));
         std::copy(data.begin(), data.end(), bt_hdr->data);
@@ -339,7 +339,7 @@ void bluetooth::shim::legacy::L2cap::SetDownstreamCallbacks(uint16_t cid) {
 
   bluetooth::shim::GetL2cap()->SetConnectionClosedCallback(
       cid, [this](uint16_t cid, int error_code) {
-        LOG_DEBUG("OnChannel closed callback cid:%hd", cid);
+        LOG_INFO("OnChannel closed callback cid:%hd", cid);
         if (!ConnectionExists(cid)) {
           LOG_WARN("%s Unexpected channel closure cid:%hd", __func__, cid);
           return;
@@ -364,7 +364,7 @@ bool bluetooth::shim::legacy::L2cap::DisconnectRequest(uint16_t cid) {
     LOG_WARN("%s Channel already in closing state cid:%hu", __func__, cid);
     return false;
   }
-  LOG_DEBUG("%s initiated locally cid:%hu", __func__, cid);
+  LOG_INFO("%s initiated locally cid:%hu", __func__, cid);
   cid_closing_set_.insert(cid);
   bluetooth::shim::GetL2cap()->CloseClassicConnection(cid);
   return true;
index a0b55c8..ec4498d 100644 (file)
@@ -127,7 +127,7 @@ void Stack::StartEverything() {
 
 void Stack::Start(ModuleList* modules) {
   ASSERT_LOG(!is_running_, "%s Gd stack already running", __func__);
-  LOG_DEBUG("%s Starting Gd stack", __func__);
+  LOG_INFO("%s Starting Gd stack", __func__);
 
   stack_thread_ =
       new os::Thread("gd_stack_thread", os::Thread::Priority::NORMAL);
index 1170880..2b44c88 100644 (file)
@@ -535,7 +535,7 @@ done:
     timer_gettime(timer, &time_to_expire);
     if (time_to_expire.it_value.tv_sec == 0 &&
         time_to_expire.it_value.tv_nsec == 0) {
-      LOG_DEBUG(
+      LOG_INFO(
 
           "%s alarm expiration too close for posix timers, switching to guns",
           __func__);
@@ -661,7 +661,7 @@ static void callback_dispatch(UNUSED_ATTR void* context) {
     }
   }
 
-  LOG_DEBUG("%s Callback thread exited", __func__);
+  LOG_INFO("%s Callback thread exited", __func__);
 }
 
 static bool timer_create_internal(const clockid_t clock_id, timer_t* timer) {
index 554bb4b..4d8e4a1 100644 (file)
@@ -56,7 +56,7 @@ void allocation_tracker_init(void) {
   // randomize the canary contents
   for (size_t i = 0; i < canary_size; i++) canary[i] = (char)osi_rand();
 
-  LOG_DEBUG("canary initialized");
+  LOG_INFO("canary initialized");
 
   enabled = true;
 }
index e97ec33..514913e 100644 (file)
@@ -233,7 +233,7 @@ static void* run_thread(void* start_arg) {
   }
 
   if (count > fixed_queue_capacity(thread->work_queue))
-    LOG_DEBUG("%s growing event queue on shutdown.", __func__);
+    LOG_INFO("%s growing event queue on shutdown.", __func__);
 
   LOG_WARN("%s: thread id %d, thread name %s exited", __func__, thread->tid,
            thread->name);
index 7b41fbe..51fb3fc 100644 (file)
@@ -187,7 +187,7 @@ static void wakelock_initialize(void) {
 }
 
 static void wakelock_initialize_native(void) {
-  LOG_DEBUG("%s opening wake locks", __func__);
+  LOG_INFO("%s opening wake locks", __func__);
 
   if (wake_lock_path.empty()) wake_lock_path = DEFAULT_WAKE_LOCK_PATH;
 
index 5be7d92..bd87b70 100644 (file)
@@ -218,9 +218,9 @@ static void a2dp_aac_encoder_update(uint16_t peer_mtu,
   p_feeding_params->bits_per_sample =
       a2dp_codec_config->getAudioBitsPerSample();
   p_feeding_params->channel_count = A2DP_GetTrackChannelCountAac(p_codec_info);
-  LOG_DEBUG("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
-            p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
-            p_feeding_params->channel_count);
+  LOG_INFO("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
+           p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
+           p_feeding_params->channel_count);
 
   // The codec parameters
   p_encoder_params->sample_rate =
@@ -249,10 +249,10 @@ static void a2dp_aac_encoder_update(uint16_t peer_mtu,
     a2dp_aac_encoder_cb.TxAaMtuSize = peer_mtu;
   }
 
-  LOG_DEBUG("%s: MTU=%d, peer_mtu=%d", __func__,
-            a2dp_aac_encoder_cb.TxAaMtuSize, peer_mtu);
-  LOG_DEBUG("%s: sample_rate: %d channel_mode: %d ", __func__,
-            p_encoder_params->sample_rate, p_encoder_params->channel_mode);
+  LOG_INFO("%s: MTU=%d, peer_mtu=%d", __func__, a2dp_aac_encoder_cb.TxAaMtuSize,
+           peer_mtu);
+  LOG_INFO("%s: sample_rate: %d channel_mode: %d ", __func__,
+           p_encoder_params->sample_rate, p_encoder_params->channel_mode);
 
   // Set the encoder's parameters: Audio Object Type - MANDATORY
   // A2DP_AAC_OBJECT_TYPE_MPEG2_LC -> AOT_AAC_LC
@@ -334,9 +334,8 @@ static void a2dp_aac_encoder_update(uint16_t peer_mtu,
   aac_peak_bit_rate =
       A2DP_ComputeMaxBitRateAac(p_codec_info, a2dp_aac_encoder_cb.TxAaMtuSize);
   aac_param_value = std::min(aac_param_value, aac_peak_bit_rate);
-  LOG_DEBUG("%s: MTU = %d Sampling Frequency = %d Bit Rate = %d", __func__,
-            a2dp_aac_encoder_cb.TxAaMtuSize, aac_sampling_freq,
-            aac_param_value);
+  LOG_INFO("%s: MTU = %d Sampling Frequency = %d Bit Rate = %d", __func__,
+           a2dp_aac_encoder_cb.TxAaMtuSize, aac_sampling_freq, aac_param_value);
   if (aac_param_value == -1) {
     LOG_ERROR(
         "%s: Cannot set AAC parameter AACENC_BITRATE: "
@@ -466,7 +465,7 @@ static void a2dp_aac_encoder_update(uint16_t peer_mtu,
   p_encoder_params->frame_length = aac_info.frameLength;
   p_encoder_params->input_channels_n = aac_info.inputChannels;
   p_encoder_params->max_encoded_buffer_bytes = aac_info.maxOutBufBytes;
-  LOG_DEBUG(
+  LOG_INFO(
       "%s: AAC frame_length = %u input_channels_n = %u "
       "max_encoded_buffer_bytes = %d",
       __func__, p_encoder_params->frame_length,
index f133374..2c416cb 100644 (file)
@@ -106,7 +106,7 @@ void A2dpCodecConfig::setDefaultCodecPriority() {
 A2dpCodecConfig* A2dpCodecConfig::createCodec(
     btav_a2dp_codec_index_t codec_index,
     btav_a2dp_codec_priority_t codec_priority) {
-  LOG_DEBUG("%s: codec %s", __func__, A2DP_CodecIndexStr(codec_index));
+  LOG_INFO("%s: codec %s", __func__, A2DP_CodecIndexStr(codec_index));
 
   A2dpCodecConfig* codec_config = nullptr;
   switch (codec_index) {
@@ -555,7 +555,7 @@ A2dpCodecs::~A2dpCodecs() {
 }
 
 bool A2dpCodecs::init() {
-  LOG_DEBUG("%s", __func__);
+  LOG_INFO("%s", __func__);
   std::lock_guard<std::recursive_mutex> lock(codec_mutex_);
   char* tok = NULL;
   char* tmp_token = NULL;
@@ -729,8 +729,8 @@ bool A2dpCodecs::setCodecUserConfig(
   *p_restart_output = false;
   *p_config_updated = false;
 
-  LOG_DEBUG("%s: Configuring: %s", __func__,
-            codec_user_config.ToString().c_str());
+  LOG_INFO("%s: Configuring: %s", __func__,
+           codec_user_config.ToString().c_str());
 
   if (codec_user_config.codec_type < BTAV_A2DP_CODEC_INDEX_MAX) {
     auto iter = indexed_codecs_.find(codec_user_config.codec_type);
@@ -809,7 +809,7 @@ bool A2dpCodecs::setCodecUserConfig(
 
   if (*p_restart_input || *p_restart_output) *p_config_updated = true;
 
-  LOG_DEBUG(
+  LOG_INFO(
       "%s: Configured: restart_input = %d restart_output = %d "
       "config_updated = %d",
       __func__, *p_restart_input, *p_restart_output, *p_config_updated);
index 0a8778c..1b2e80f 100644 (file)
@@ -217,9 +217,9 @@ static void a2dp_sbc_encoder_update(uint16_t peer_mtu,
   p_feeding_params->bits_per_sample =
       a2dp_codec_config->getAudioBitsPerSample();
   p_feeding_params->channel_count = A2DP_GetTrackChannelCountSbc(p_codec_info);
-  LOG_DEBUG("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
-            p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
-            p_feeding_params->channel_count);
+  LOG_INFO("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
+           p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
+           p_feeding_params->channel_count);
   a2dp_sbc_feeding_reset();
 
   // The codec parameters
@@ -270,10 +270,9 @@ static void a2dp_sbc_encoder_update(uint16_t peer_mtu,
   // Set the initial target bit rate
   p_encoder_params->u16BitRate = a2dp_sbc_source_rate();
 
-  LOG_DEBUG("%s: MTU=%d, peer_mtu=%d min_bitpool=%d max_bitpool=%d", __func__,
-            a2dp_sbc_encoder_cb.TxAaMtuSize, peer_mtu, min_bitpool,
-            max_bitpool);
-  LOG_DEBUG(
+  LOG_INFO("%s: MTU=%d, peer_mtu=%d min_bitpool=%d max_bitpool=%d", __func__,
+           a2dp_sbc_encoder_cb.TxAaMtuSize, peer_mtu, min_bitpool, max_bitpool);
+  LOG_INFO(
       "%s: ChannelMode=%d, NumOfSubBands=%d, NumOfBlocks=%d, "
       "AllocationMethod=%d, BitRate=%d, SamplingFreq=%d BitPool=%d",
       __func__, p_encoder_params->s16ChannelMode,
@@ -329,11 +328,11 @@ static void a2dp_sbc_encoder_update(uint16_t peer_mtu,
 
     if (s16BitPool < 0) s16BitPool = 0;
 
-    LOG_DEBUG("%s: bitpool candidate: %d (%d kbps)", __func__, s16BitPool,
-              p_encoder_params->u16BitRate);
+    LOG_INFO("%s: bitpool candidate: %d (%d kbps)", __func__, s16BitPool,
+             p_encoder_params->u16BitRate);
 
     if (s16BitPool > max_bitpool) {
-      LOG_DEBUG("%s: computed bitpool too large (%d)", __func__, s16BitPool);
+      LOG_INFO("%s: computed bitpool too large (%d)", __func__, s16BitPool);
       /* Decrease bitrate */
       p_encoder_params->u16BitRate -= A2DP_SBC_BITRATE_STEP;
       /* Record that we have decreased the bitrate */
@@ -361,8 +360,8 @@ static void a2dp_sbc_encoder_update(uint16_t peer_mtu,
   /* Finally update the bitpool in the encoder structure */
   p_encoder_params->s16BitPool = s16BitPool;
 
-  LOG_DEBUG("%s: final bit rate %d, final bit pool %d", __func__,
-            p_encoder_params->u16BitRate, p_encoder_params->s16BitPool);
+  LOG_INFO("%s: final bit rate %d, final bit pool %d", __func__,
+           p_encoder_params->u16BitRate, p_encoder_params->s16BitPool);
 
   /* Reset the SBC encoder */
   SBC_Encoder_Init(&a2dp_sbc_encoder_cb.sbc_encoder_params);
@@ -385,8 +384,8 @@ void a2dp_sbc_feeding_reset(void) {
        A2DP_SBC_ENCODER_INTERVAL_MS) /
       1000;
 
-  LOG_DEBUG("%s: PCM bytes per tick %u", __func__,
-            a2dp_sbc_encoder_cb.feeding_state.bytes_per_tick);
+  LOG_INFO("%s: PCM bytes per tick %u", __func__,
+           a2dp_sbc_encoder_cb.feeding_state.bytes_per_tick);
 }
 
 void a2dp_sbc_feeding_flush(void) {
@@ -902,7 +901,7 @@ static uint32_t a2dp_sbc_frame_length(void) {
 
 uint32_t a2dp_sbc_get_bitrate() {
   SBC_ENC_PARAMS* p_encoder_params = &a2dp_sbc_encoder_cb.sbc_encoder_params;
-  LOG_DEBUG("%s: bit rate %d ", __func__, p_encoder_params->u16BitRate);
+  LOG_INFO("%s: bit rate %d ", __func__, p_encoder_params->u16BitRate);
   return p_encoder_params->u16BitRate * 1000;
 }
 
index b27e775..bc87521 100644 (file)
@@ -259,9 +259,9 @@ static void a2dp_vendor_aptx_encoder_update(uint16_t peer_mtu,
       a2dp_codec_config->getAudioBitsPerSample();
   p_feeding_params->channel_count =
       A2DP_VendorGetTrackChannelCountAptx(p_codec_info);
-  LOG_DEBUG("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
-            p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
-            p_feeding_params->channel_count);
+  LOG_INFO("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
+           p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
+           p_feeding_params->channel_count);
   a2dp_vendor_aptx_feeding_reset();
 }
 
@@ -296,8 +296,8 @@ static void aptx_init_framing_params(tAPTX_FRAMING_PARAMS* framing_params) {
     }
   }
 
-  LOG_DEBUG("%s: sleep_time_ns = %" PRIu64, __func__,
-            framing_params->sleep_time_ns);
+  LOG_INFO("%s: sleep_time_ns = %" PRIu64, __func__,
+           framing_params->sleep_time_ns);
 }
 
 //
index c9f2ccb..5856e08 100644 (file)
@@ -260,9 +260,9 @@ static void a2dp_vendor_aptx_hd_encoder_update(
       a2dp_codec_config->getAudioBitsPerSample();
   p_feeding_params->channel_count =
       A2DP_VendorGetTrackChannelCountAptxHd(p_codec_info);
-  LOG_DEBUG("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
-            p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
-            p_feeding_params->channel_count);
+  LOG_INFO("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
+           p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
+           p_feeding_params->channel_count);
   a2dp_vendor_aptx_hd_feeding_reset();
 }
 
@@ -285,8 +285,8 @@ static void aptx_hd_init_framing_params(
 
   framing_params->sleep_time_ns = 9000000;
 
-  LOG_DEBUG("%s: sleep_time_ns = %" PRIu64, __func__,
-            framing_params->sleep_time_ns);
+  LOG_INFO("%s: sleep_time_ns = %" PRIu64, __func__,
+           framing_params->sleep_time_ns);
 }
 
 //
index 7959711..a34d180 100644 (file)
@@ -214,7 +214,7 @@ bool a2dp_vendor_ldac_decoder_decode_packet(BT_HDR* p_buf) {
   frame_number = (int)pBuffer[0];
   bs_bytes = (int)bytesValid;
   bytesValid -= 1;
-  LOG_DEBUG("%s:INPUT size : %d, frame : %d", __func__, bs_bytes, frame_number);
+  LOG_INFO("%s:INPUT size : %d, frame : %d", __func__, bs_bytes, frame_number);
 
   if (a2dp_ldac_decoder_cb.has_ldac_handle)
     ldac_BCO_decode_packet_func(a2dp_ldac_decoder_cb.ldac_handle_bco, pBuffer,
@@ -226,7 +226,7 @@ bool a2dp_vendor_ldac_decoder_decode_packet(BT_HDR* p_buf) {
 
 void a2dp_vendor_ldac_decoder_start(void) {
   pthread_mutex_lock(&(a2dp_ldac_decoder_cb.mutex));
-  LOG_DEBUG("%s", __func__);
+  LOG_INFO("%s", __func__);
   if (a2dp_ldac_decoder_cb.has_ldac_handle)
     ldac_BCO_start_func(a2dp_ldac_decoder_cb.ldac_handle_bco);
   pthread_mutex_unlock(&(a2dp_ldac_decoder_cb.mutex));
@@ -234,7 +234,7 @@ void a2dp_vendor_ldac_decoder_start(void) {
 
 void a2dp_vendor_ldac_decoder_suspend(void) {
   pthread_mutex_lock(&(a2dp_ldac_decoder_cb.mutex));
-  LOG_DEBUG("%s", __func__);
+  LOG_INFO("%s", __func__);
   if (a2dp_ldac_decoder_cb.has_ldac_handle)
     ldac_BCO_suspend_func(a2dp_ldac_decoder_cb.ldac_handle_bco);
   pthread_mutex_unlock(&(a2dp_ldac_decoder_cb.mutex));
@@ -255,8 +255,8 @@ void a2dp_vendor_ldac_decoder_configure(const uint8_t* p_codec_info) {
   bits_per_sample = A2DP_VendorGetTrackBitsPerSampleLdac(p_codec_info);
   channel_mode = A2DP_VendorGetChannelModeCodeLdac(p_codec_info);
 
-  LOG_DEBUG("%s , sample_rate=%d, bits_per_sample=%d, channel_mode=%d",
-            __func__, sample_rate, bits_per_sample, channel_mode);
+  LOG_INFO("%s , sample_rate=%d, bits_per_sample=%d, channel_mode=%d", __func__,
+           sample_rate, bits_per_sample, channel_mode);
 
   if (a2dp_ldac_decoder_cb.has_ldac_handle)
     ldac_BCO_configure_func(a2dp_ldac_decoder_cb.ldac_handle_bco, sample_rate,
index 8da55bf..6114df4 100644 (file)
@@ -380,9 +380,9 @@ static void a2dp_vendor_ldac_encoder_update(uint16_t peer_mtu,
       a2dp_codec_config->getAudioBitsPerSample();
   p_feeding_params->channel_count =
       A2DP_VendorGetTrackChannelCountLdac(p_codec_info);
-  LOG_DEBUG("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
-            p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
-            p_feeding_params->channel_count);
+  LOG_INFO("%s: sample_rate=%u bits_per_sample=%u channel_count=%u", __func__,
+           p_feeding_params->sample_rate, p_feeding_params->bits_per_sample,
+           p_feeding_params->channel_count);
   a2dp_vendor_ldac_feeding_reset();
 
   // The codec parameters
@@ -403,14 +403,14 @@ static void a2dp_vendor_ldac_encoder_update(uint16_t peer_mtu,
   int old_quality_mode_index = p_encoder_params->quality_mode_index;
   if (codec_config.codec_specific_1 != 0) {
     p_encoder_params->quality_mode_index = codec_config.codec_specific_1 % 10;
-    LOG_DEBUG("%s: setting quality mode to %s", __func__,
-              quality_mode_index_to_name(p_encoder_params->quality_mode_index)
-                  .c_str());
+    LOG_INFO("%s: setting quality mode to %s", __func__,
+             quality_mode_index_to_name(p_encoder_params->quality_mode_index)
+                 .c_str());
   } else {
     p_encoder_params->quality_mode_index = A2DP_LDAC_QUALITY_ABR;
-    LOG_DEBUG("%s: setting quality mode to default %s", __func__,
-              quality_mode_index_to_name(p_encoder_params->quality_mode_index)
-                  .c_str());
+    LOG_INFO("%s: setting quality mode to default %s", __func__,
+             quality_mode_index_to_name(p_encoder_params->quality_mode_index)
+                 .c_str());
   }
 
   int ldac_eqmid = LDAC_ABR_MODE_EQMID;
@@ -424,14 +424,14 @@ static void a2dp_vendor_ldac_encoder_update(uint16_t peer_mtu,
           quality_mode_index_to_name(p_encoder_params->quality_mode_index)
               .c_str());
     } else {
-      LOG_DEBUG("%s: changing mode from %s to %s", __func__,
-                quality_mode_index_to_name(old_quality_mode_index).c_str(),
-                quality_mode_index_to_name(p_encoder_params->quality_mode_index)
-                    .c_str());
+      LOG_INFO("%s: changing mode from %s to %s", __func__,
+               quality_mode_index_to_name(old_quality_mode_index).c_str(),
+               quality_mode_index_to_name(p_encoder_params->quality_mode_index)
+                   .c_str());
       if (a2dp_ldac_encoder_cb.ldac_abr_handle != NULL) {
-        LOG_DEBUG("%s: already in LDAC ABR mode, do nothing.", __func__);
+        LOG_INFO("%s: already in LDAC ABR mode, do nothing.", __func__);
       } else {
-        LOG_DEBUG("%s: get and init LDAC ABR handle.", __func__);
+        LOG_INFO("%s: get and init LDAC ABR handle.", __func__);
         a2dp_ldac_encoder_cb.ldac_abr_handle = a2dp_ldac_abr_get_handle();
         if (a2dp_ldac_encoder_cb.ldac_abr_handle != NULL) {
           a2dp_ldac_encoder_cb.has_ldac_abr_handle = true;
@@ -441,7 +441,7 @@ static void a2dp_vendor_ldac_encoder_update(uint16_t peer_mtu,
                              A2DP_LDAC_ENCODER_INTERVAL_MS);
         } else {
           p_encoder_params->quality_mode_index = A2DP_LDAC_QUALITY_MID;
-          LOG_DEBUG(
+          LOG_INFO(
 
               "%s: get LDAC ABR handle failed, resetting quality mode to %s.",
               __func__,
@@ -452,8 +452,8 @@ static void a2dp_vendor_ldac_encoder_update(uint16_t peer_mtu,
     }
   } else {
     ldac_eqmid = p_encoder_params->quality_mode_index;
-    LOG_DEBUG("%s: in %s mode, free LDAC ABR handle.", __func__,
-              quality_mode_index_to_name(ldac_eqmid).c_str());
+    LOG_INFO("%s: in %s mode, free LDAC ABR handle.", __func__,
+             quality_mode_index_to_name(ldac_eqmid).c_str());
     if (a2dp_ldac_encoder_cb.has_ldac_abr_handle) {
       a2dp_ldac_abr_free_handle(a2dp_ldac_encoder_cb.ldac_abr_handle);
       a2dp_ldac_encoder_cb.ldac_abr_handle = NULL;
@@ -477,9 +477,9 @@ static void a2dp_vendor_ldac_encoder_update(uint16_t peer_mtu,
   else if (p_encoder_params->pcm_wlength == 4)
     p_encoder_params->pcm_fmt = LDACBT_SMPL_FMT_S32;
 
-  LOG_DEBUG("%s: MTU=%d, peer_mtu=%d", __func__,
-            a2dp_ldac_encoder_cb.TxAaMtuSize, peer_mtu);
-  LOG_DEBUG(
+  LOG_INFO("%s: MTU=%d, peer_mtu=%d", __func__,
+           a2dp_ldac_encoder_cb.TxAaMtuSize, peer_mtu);
+  LOG_INFO(
       "%s: sample_rate: %d channel_mode: %d "
       "quality_mode_index: %d pcm_wlength: %d pcm_fmt: %d",
       __func__, p_encoder_params->sample_rate, p_encoder_params->channel_mode,
@@ -523,8 +523,8 @@ void a2dp_vendor_ldac_feeding_reset(void) {
        A2DP_LDAC_ENCODER_INTERVAL_MS) /
       1000;
 
-  LOG_DEBUG("%s: PCM bytes per tick %u", __func__,
-            a2dp_ldac_encoder_cb.ldac_feeding_state.bytes_per_tick);
+  LOG_INFO("%s: PCM bytes per tick %u", __func__,
+           a2dp_ldac_encoder_cb.ldac_feeding_state.bytes_per_tick);
 }
 
 void a2dp_vendor_ldac_feeding_flush(void) {
index 3c8faf8..8945a95 100644 (file)
@@ -172,8 +172,8 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
          (p_mode->min <= p_cb->interval)) ||
         ((p_mode->mode & BTM_PM_MD_FORCE) == 0 &&
          (p_mode->max >= p_cb->interval))) {
-      LOG_DEBUG("already in requested mode %d, interval: %d, max: %d, min: %d",
-                p_mode->mode, p_cb->interval, p_mode->max, p_mode->min);
+      LOG_INFO("already in requested mode %d, interval: %d, max: %d, min: %d",
+               p_mode->mode, p_cb->interval, p_mode->max, p_mode->min);
       return BTM_SUCCESS;
     }
   }
@@ -198,20 +198,20 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda,
   /* if mode == hold or pending, return */
   if ((p_cb->state == BTM_PM_STS_HOLD) || (p_cb->state == BTM_PM_STS_PENDING) ||
       (btm_cb.acl_cb_.pm_pend_link != MAX_L2CAP_LINKS)) {
-    LOG_DEBUG("storing pm setup, state: %d, pm_pending_link: %d", p_cb->state,
-              btm_cb.acl_cb_.pm_pend_link);
+    LOG_INFO("storing pm setup, state: %d, pm_pending_link: %d", p_cb->state,
+             btm_cb.acl_cb_.pm_pend_link);
     /* command pending */
     if (acl_ind != btm_cb.acl_cb_.pm_pend_link) {
       /* set the stored mask */
       p_cb->state |= BTM_PM_STORED_MASK;
-      LOG_DEBUG("btm_pm state stored: %d", acl_ind);
+      LOG_INFO("btm_pm state stored: %d", acl_ind);
     }
     return BTM_CMD_STORED;
   }
 
-  LOG_DEBUG("pm_id: %d, bda: %s, mode: %d, state: %d, pending_link: %d", pm_id,
-            remote_bda.ToString().c_str(), p_mode->mode, p_cb->state,
-            btm_cb.acl_cb_.pm_pend_link);
+  LOG_INFO("pm_id: %d, bda: %s, mode: %d, state: %d, pending_link: %d", pm_id,
+           remote_bda.ToString().c_str(), p_mode->mode, p_cb->state,
+           btm_cb.acl_cb_.pm_pend_link);
 
   return internal_.btm_pm_snd_md_req(pm_id, acl_ind, p_mode);
 }
@@ -279,7 +279,7 @@ tBTM_STATUS BTM_SetSsrParams(const RawAddress& remote_bda, uint16_t max_lat,
                               max_lat, min_rmt_to, min_loc_to);
     return BTM_SUCCESS;
   }
-  LOG_DEBUG("pm_mode_db state: %d", btm_cb.acl_cb_.pm_mode_db[acl_ind].state);
+  LOG_INFO("pm_mode_db state: %d", btm_cb.acl_cb_.pm_mode_db[acl_ind].state);
   tBTM_PM_MCB* p_cb = &btm_cb.acl_cb_.pm_mode_db[acl_ind];
   p_cb->max_lat = max_lat;
   p_cb->min_rmt_to = min_rmt_to;
@@ -318,7 +318,7 @@ void btm_pm_reset(void) {
   }
   /* no command pending */
   btm_cb.acl_cb_.pm_pend_link = MAX_L2CAP_LINKS;
-  LOG_DEBUG("reset pm");
+  LOG_INFO("reset pm");
 }
 
 /*******************************************************************************
@@ -468,7 +468,7 @@ tBTM_STATUS StackAclBtmPm::btm_pm_snd_md_req(uint8_t pm_id, int link_ind,
   mode = btm_pm_get_set_mode(pm_id, p_cb, p_mode, &md_res);
   md_res.mode = mode;
 
-  LOG_DEBUG("link_ind: %d, mode: %d", link_ind, mode);
+  LOG_INFO("link_ind: %d, mode: %d", link_ind, mode);
 
   if (p_cb->state == mode) {
     /* already in the resulting mode */
@@ -498,9 +498,9 @@ tBTM_STATUS StackAclBtmPm::btm_pm_snd_md_req(uint8_t pm_id, int link_ind,
   /* send the appropriate HCI command */
   btm_cb.pm_pend_id = pm_id;
 
-  LOG_DEBUG("switching from %s(0x%x) to %s(0x%x), link_ind: %d",
-            mode_to_string(p_cb->state), p_cb->state,
-            mode_to_string(md_res.mode), md_res.mode, link_ind);
+  LOG_INFO("switching from %s(0x%x) to %s(0x%x), link_ind: %d",
+           mode_to_string(p_cb->state), p_cb->state,
+           mode_to_string(md_res.mode), md_res.mode, link_ind);
 
   switch (md_res.mode) {
     case BTM_PM_MD_ACTIVE:
@@ -589,8 +589,8 @@ void btm_pm_proc_cmd_status(uint8_t status) {
   }
 
   /* no pending cmd now */
-  LOG_DEBUG("state: %d, pend_link: %d", p_cb->state,
-            btm_cb.acl_cb_.pm_pend_link);
+  LOG_INFO("state: %d, pend_link: %d", p_cb->state,
+           btm_cb.acl_cb_.pm_pend_link);
   btm_cb.acl_cb_.pm_pend_link = MAX_L2CAP_LINKS;
 
   /*******************************************************************************
@@ -650,8 +650,8 @@ void btm_pm_proc_mode_change(uint8_t hci_status, uint16_t hci_handle,
   p_cb->state = mode;
   p_cb->interval = interval;
 
-  LOG_DEBUG("switched from [%s] to [%s].", mode_to_string(old_state),
-            mode_to_string(p_cb->state));
+  LOG_INFO("switched from [%s] to [%s].", mode_to_string(old_state),
+           mode_to_string(p_cb->state));
 
   if ((p_cb->state == BTM_PM_ST_ACTIVE) || (p_cb->state == BTM_PM_ST_SNIFF)) {
     l2c_OnHciModeChangeSendPendingPackets(bd_addr);
index 30e9202..888077a 100644 (file)
@@ -1727,14 +1727,14 @@ void btm_ble_connected(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
                        bool addr_matched) {
   tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bda);
   if (!p_dev_rec) {
-    LOG_DEBUG("Creating new device record for new ble connection");
+    LOG_INFO("Creating new device record for new ble connection");
     p_dev_rec = btm_sec_alloc_dev(bda);
     if (p_dev_rec == nullptr) {
       LOG_WARN("Unable to create device record for new ble connection");
       return;
     }
   } else {
-    LOG_DEBUG("Updating device record timestamp for existing ble connection");
+    LOG_INFO("Updating device record timestamp for existing ble connection");
     // TODO() Why is timestamp a counter ?
     p_dev_rec->timestamp = btm_cb.dev_rec_count++;
   }
index 4deea92..b212b8a 100644 (file)
@@ -918,7 +918,7 @@ void btm_ble_set_adv_flag(uint16_t connect_mode, uint16_t disc_mode) {
 
   btm_ble_update_dmt_flag_bits(&flag, connect_mode, disc_mode);
 
-  LOG_DEBUG("disc_mode %04x", disc_mode);
+  LOG_INFO("disc_mode %04x", disc_mode);
   /* update discoverable flag */
   if (disc_mode & BTM_BLE_LIMITED_DISCOVERABLE) {
     flag &= ~BTM_BLE_GEN_DISC_FLAG;
@@ -1572,13 +1572,13 @@ void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type,
   if ((p_cur->flag & BTM_BLE_BREDR_NOT_SPT) == 0 &&
       !ble_evt_type_is_directed(evt_type)) {
     if (p_cur->ble_addr_type != BLE_ADDR_RANDOM) {
-      LOG_DEBUG("NOT_BR_EDR support bit not set, treat device as DUMO");
+      LOG_INFO("NOT_BR_EDR support bit not set, treat device as DUMO");
       p_cur->device_type |= BT_DEVICE_TYPE_DUMO;
     } else {
-      LOG_DEBUG("Random address, treat device as LE only");
+      LOG_INFO("Random address, treat device as LE only");
     }
   } else {
-    LOG_DEBUG("NOT_BR/EDR support bit set, treat device as LE only");
+    LOG_INFO("NOT_BR/EDR support bit set, treat device as LE only");
   }
 }
 
@@ -1876,7 +1876,7 @@ void btm_ble_process_adv_pkt_cont(uint16_t evt_type, uint8_t addr_type,
   uint8_t result = btm_ble_is_discoverable(bda, adv_data);
   if (result == 0) {
     cache.Clear(addr_type, bda);
-    LOG_DEBUG("device no longer discoverable, discarding advertising packet");
+    LOG_INFO("device no longer discoverable, discarding advertising packet");
     return;
   }
 
index fc42fcb..37a4108 100644 (file)
@@ -182,7 +182,7 @@ static void remove_all_clients_with_pending_connections(
 }
 
 void on_connection_complete(const RawAddress& address) {
-  LOG_DEBUG("Le connection completed to device:%s", address.ToString().c_str());
+  LOG_INFO("Le connection completed to device:%s", address.ToString().c_str());
 
   remove_all_clients_with_pending_connections(address);
 }
index 25369f0..c7923a5 100644 (file)
@@ -701,7 +701,6 @@ void LinkLayerController::IncomingInquiryResponsePacket(
 
 void LinkLayerController::IncomingIoCapabilityRequestPacket(
     model::packets::LinkLayerPacketView incoming) {
-  LOG_DEBUG();
   if (!simple_pairing_mode_enabled_) {
     LOG_WARN("Only simple pairing mode is implemented");
     return;
@@ -739,8 +738,6 @@ void LinkLayerController::IncomingIoCapabilityRequestPacket(
 
 void LinkLayerController::IncomingIoCapabilityResponsePacket(
     model::packets::LinkLayerPacketView incoming) {
-  LOG_DEBUG();
-
   auto response = model::packets::IoCapabilityResponseView::Create(incoming);
   ASSERT(response.IsValid());
 
@@ -772,7 +769,6 @@ void LinkLayerController::IncomingIoCapabilityResponsePacket(
 
 void LinkLayerController::IncomingIoCapabilityNegativeResponsePacket(
     model::packets::LinkLayerPacketView incoming) {
-  LOG_DEBUG();
   Address peer = incoming.GetSourceAddress();
 
   ASSERT(security_manager_.GetAuthenticationAddress() == peer);