filter

fun filter(predicate: (ApplicationCall) -> Boolean)

Allows you to add conditions for filtering requests. In the example below, only requests made to /api/v1 get into a log:

filter { call ->
call.request.path().startsWith("/api/v1")
}

See also