diff --git a/Meshtastic/Extensions/Logger.swift b/Meshtastic/Extensions/Logger.swift index 4ed1f673..930d47ef 100644 --- a/Meshtastic/Extensions/Logger.swift +++ b/Meshtastic/Extensions/Logger.swift @@ -51,7 +51,7 @@ extension OSLogEntryLog.Level { var description: String { switch self { case .undefined: "undefined" - case .debug: "🐛 Debug" + case .debug: "đŸŠē Debug" case .info: "â„šī¸ Info" case .notice: "âš ī¸ Notice" case .error: "🚨 Error" diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index 42acd0a0..fb2c5f29 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -62,7 +62,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate func startScanning() { if isSwitchedOn { centralManager.scanForPeripherals(withServices: [meshtasticServiceCBUUID], options: [CBCentralManagerScanOptionAllowDuplicatesKey: false]) - Logger.services.info("✅ Scanning Started") + Logger.services.info("đŸŸĸ Started Scanning for BLE Devices") } } @@ -70,7 +70,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate func stopScanning() { if centralManager.isScanning { centralManager.stopScan() - Logger.services.info("🛑 Stopped Scanning") + Logger.services.info("🛑 Stopped Scanning for BLE Devices") } } @@ -492,7 +492,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate } func peripheral(_ peripheral: CBPeripheral, didUpdateNotificationStateFor characteristic: CBCharacteristic, error: Error?) { - Logger.services.error("đŸ’Ĩ didUpdateNotificationStateFor error: \(error?.localizedDescription ?? "Unknown")") + Logger.services.error("đŸ’Ĩ BLE didUpdateNotificationStateFor error: \(error?.localizedDescription ?? "Unknown")") } // MARK: Data Read / Update Characteristic Event @@ -500,14 +500,13 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate if let error { - Logger.services.error("đŸšĢ didUpdateValueFor Characteristic error \(error.localizedDescription)") + Logger.services.error("đŸšĢ BLE didUpdateValueFor Characteristic error \(error.localizedDescription)") let errorCode = (error as NSError).code if errorCode == 5 || errorCode == 15 { // BLE PIN connection errors // 5 CBATTErrorDomain Code=5 "Authentication is insufficient." // 15 CBATTErrorDomain Code=15 "Encryption is insufficient." lastConnectionError = "🚨" + String.localizedStringWithFormat("ble.errorcode.pin %@".localized, error.localizedDescription) - Logger.services.error("đŸ’Ĩ \(error.localizedDescription) Please try connecting again and check the PIN carefully.") self.disconnectPeripheral(reconnect: false) } return @@ -803,7 +802,8 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate } case FROMNUM_UUID: - Logger.services.info("đŸ—žī¸ BLE (Notify) characteristic, value will be read next") + return + // Logger.services.info("đŸ—žī¸ BLE (Notify) characteristic, value will be read next") default: Logger.services.error("Unhandled Characteristic UUID: \(characteristic.uuid)") } @@ -3013,7 +3013,7 @@ extension BLEManager: CBCentralManagerDelegate { default: status = "default" } - Logger.services.debug("📜 BLEManager status: \(status)") + Logger.services.debug("📜 BLE status: \(status)") } // Called each time a peripheral is discovered diff --git a/Meshtastic/Views/Settings/AppLog.swift b/Meshtastic/Views/Settings/AppLog.swift index 3188f306..ffb83514 100644 --- a/Meshtastic/Views/Settings/AppLog.swift +++ b/Meshtastic/Views/Settings/AppLog.swift @@ -94,7 +94,7 @@ struct AppLog: View { } } ) - .navigationBarTitle("Debug Logs", displayMode: .inline) + .navigationBarTitle("Debug Logs\(logs.isEmpty ? "" : " (\(logs.count))")", displayMode: .inline) .toolbar { if !logs.isEmpty { ToolbarItem(placement: .navigationBarTrailing) { diff --git a/Meshtastic/Views/Settings/Settings.swift b/Meshtastic/Views/Settings/Settings.swift index 55a77b65..45a14230 100644 --- a/Meshtastic/Views/Settings/Settings.swift +++ b/Meshtastic/Views/Settings/Settings.swift @@ -431,7 +431,7 @@ struct Settings: View { Label { Text("Debug Logs") } icon: { - Image(systemName: "ladybug") + Image(systemName: "stethoscope") } } .tag(SettingsSidebar.appLog)