From e9d007606a142091f9d8a5981f2704f74d8fba19 Mon Sep 17 00:00:00 2001 From: kkonteh97 <55326260+kkonteh97@users.noreply.github.com> Date: Wed, 17 Apr 2024 17:06:41 -0700 Subject: [PATCH] added loggers --- Sources/SwiftOBD2/Communication/bleManager.swift | 6 +++--- Sources/SwiftOBD2/elm327.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/SwiftOBD2/Communication/bleManager.swift b/Sources/SwiftOBD2/Communication/bleManager.swift index 26e905e..5ef4284 100644 --- a/Sources/SwiftOBD2/Communication/bleManager.swift +++ b/Sources/SwiftOBD2/Communication/bleManager.swift @@ -325,9 +325,9 @@ class BLEManager: NSObject, CommProtocol { // remove the last line lines.removeLast() -// #if DEBUG -// logger.debug("Response: \(lines)") -// #endif + #if DEBUG + logger.debug("Response: \(lines)") + #endif if sendMessageCompletion != nil { if lines[0].uppercased().contains("NO DATA") { diff --git a/Sources/SwiftOBD2/elm327.swift b/Sources/SwiftOBD2/elm327.swift index 924beef..65ce63c 100644 --- a/Sources/SwiftOBD2/elm327.swift +++ b/Sources/SwiftOBD2/elm327.swift @@ -240,7 +240,7 @@ class ELM327 { } else { print("Invalid response: \(response)") logger.error("Invalid response: \(response)") - throw SetupError.invalidResponse(message: "message: \(message), \(response.first)") + throw SetupError.invalidResponse(message: "message: \(message), \(String(describing: response.first))") } }