Error Not Logged With Object (ARCH9159)
Key swift.logging.error-not-logged-with-object · Severity warning · Category logging
Flags catch blocks that log a message without the error - nothing about the failure reaches the log.
Incorrect
Section titled “Incorrect”catch { logger.error("upload failed") }Correct
Section titled “Correct”catch { logger.error("upload failed: \(error)") }Include the error in the log call.