Skip to content

Exception Not Logged With Object (ARCH8159)

Key kotlin.logging.exception-not-logged-with-object · Severity warning · Category logging

Flags log calls inside catch that pass only a message - the exception object with its stack trace never reaches the log.

catch (e: IOException) { log.error("upload failed") }
catch (e: IOException) { log.error("upload failed", e) }

Pass the exception as the last argument.