KotlinSqlLogger

class KotlinSqlLogger(val logger: KLogger = ExposedUtils.logger) : SqlLogger

An Exposed SqlLogger that logs SQL statements via a Kotlin KLogger, at debug level.

Each statement is logged with its bound arguments inlined, so the log carries whatever values were written: passwords, tokens or personal data included. Debug level, as with Exposed's own Slf4jSqlDebugLogger, keeps that out of production logs unless it is switched on deliberately.

Constructors

Link copied to clipboard
constructor(logger: KLogger = ExposedUtils.logger)

Properties

Link copied to clipboard
val logger: KLogger

the KLogger to use for logging; defaults to the module-level logger

Functions

Link copied to clipboard
open override fun log(context: StatementContext, transaction: Transaction)