Configuration

class Configuration

Configuration for CallLogging feature

Constructors

Link copied to clipboard
fun Configuration()

Functions

Link copied to clipboard
fun disableDefaultColors()

Disables colors in log message in case the default formatter was used.

Link copied to clipboard
fun filter(predicate: (ApplicationCall) -> Boolean)

Log messages for calls matching a predicate

Link copied to clipboard
fun format(formatter: (ApplicationCall) -> String)

Configure application call log message.

Link copied to clipboard
fun mdc(name: String, provider: (ApplicationCall) -> String?)

Put a diagnostic context value to MDC with the specified name and computed using provider function. A value will be available in MDC only during ApplicationCall lifetime and will be removed after call processing.

Properties

Link copied to clipboard
var level: Level

Logging level for CallLogging, default is Level.INFO

Link copied to clipboard
var logger: Logger? = null

Customize Logger, will default to ApplicationEnvironment.log

Extensions

Link copied to clipboard
fun CallLogging.Configuration.callIdMdc(name: String = "CallId")

Put call id into MDC (diagnostic context value) with name