Logging updates

This commit is contained in:
Garth Vander Houwen 2024-06-25 08:29:26 -07:00
parent df87fb538d
commit 7cd1e897a7
2 changed files with 5 additions and 5 deletions

View file

@ -197,7 +197,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
connectedPeripheral.peripheral.delegate = self
} else {
// we are null just disconnect and start over
lastConnectionError = "Bluetooth connection error, please try again."
lastConnectionError = "🚫 [BLE] Bluetooth connection error, please try again."
disconnectPeripheral()
return
}
@ -501,9 +501,9 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
func peripheral(_ peripheral: CBPeripheral, didUpdateNotificationStateFor characteristic: CBCharacteristic, error: Error?) {
if let error {
Logger.services.error("💥 BLE didUpdateNotificationStateFor error: \(characteristic.uuid, privacy: .public) \(error.localizedDescription, privacy: .public)")
Logger.services.error("💥 [BLE] didUpdateNotificationStateFor error: \(characteristic.uuid, privacy: .public) \(error.localizedDescription, privacy: .public)")
} else {
Logger.services.info(" peripheral didUpdateNotificationStateFor \(characteristic.uuid, privacy: .public)")
Logger.services.info(" [BLE] peripheral didUpdateNotificationStateFor \(characteristic.uuid, privacy: .public)")
}
}
@ -519,7 +519,7 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
// 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, privacy: .public) Please try connecting again and check the PIN carefully.")
Logger.services.error("🚫 [BLE] \(error.localizedDescription, privacy: .public) Please try connecting again and check the PIN carefully.")
self.disconnectPeripheral(reconnect: false)
}
return

View file

@ -53,7 +53,7 @@ struct AppData: View {
VStack(alignment: .leading ) {
if file.pathExtension.contains("sqlite") {
Label {
Text("Node Core Data Backup \(file.pathComponents[10])/\(file.lastPathComponent) - \(file.creationDate?.formatted() ?? "") - \(file.fileSizeString)")
Text("Node Core Data Backup \(file.pathComponents[9])/\(file.lastPathComponent) - \(file.creationDate?.formatted() ?? "") - \(file.fileSizeString)")
.swipeActions {
Button(role: .none) {
bleManager.disconnectPeripheral(reconnect: false)