LoggingConfig

Configuration for HTTP request/response logging.

Obtained via the DeepSeekClientBase.Builder.logging DSL. Logging is opt-in — create a LoggingConfig by calling logging { } on the builder; otherwise nothing is logged.

Example:

val client = DeepSeekClient("token") {
logging {
level = LogLevel.BODY
sanitizeHeader { header -> header == "Cookie" }
}
}

Properties

Link copied to clipboard
var level: LogLevel

Log level controlling what is logged. Defaults to LogLevel.HEADERS.

Link copied to clipboard
var logger: Logger

Destination for log lines. Defaults to Logger.DEFAULT.

Functions

Link copied to clipboard
fun sanitizeHeader(predicate: (String) -> Boolean)

Redacts headers whose name satisfies predicate from log output.