Releases: icerockdev/web-utils
release/1.0.0: Upgraded ktor version to 2.2.2
For upgrade ktor to version 2.x in your project see Migrating from 1.6.x to 2.0.x and Migrating from 2.0.x to 2.2.x
release/0.10.1: Up ktor version to 1.6.8
Merge pull request #49 from icerockdev/up-ktor-version Up ktor and logback version
release/0.10.0: Removed jcenter and bintray, updated dependencies
Removed bintray and jcenter, updated dependencies
release/0.9.4: Added KClass support as an argument to receiveRequest
up version (#46)
release/0.9.3: Added KClass support as an argument to receiveRequest
fixed receiveRequest function (#45)
release/0.9.2: Added user ID to default logging
added user id to default call logging (#42)
release/0.9.1: More NettyEngine configurations
#39 more netty engine configuration (#40) * added support more options for NettyEngin configuration * up version
release/0.9.0: Upgraded logging feature
Upgrade ktor to version 1.5.1 or newer.
Added new ApplicationCallLogging feature with correct logging request body.
Now ApplicationCallLogging logging all raw request body (except multipart data, it is not support for now).
Now before send it hides secret fields value in request body, headers and query parameters (default field list: "password", "token", "authorization"). To change field list pass them to the function applyDefaultLogging in install ApplicationCallLogging feature, for example:
install(ApplicationCallLogging) {
applyDefaultLogging(secretFieldList = listOf("field1", "field2"))
// Log only /api requests
// filter { call -> call.request.path().startsWith("/api") }
}
Migration guide:
- Replace io.ktor.features.CallLogging to com.icerockdev.webserver.log.ApplicationCallLogging
Before:
install(CallLogging) {
applyDefaultLogging()
// Log only /api requests
// filter { call -> call.request.path().startsWith("/api") }
}
After:
install(ApplicationCallLogging) {
applyDefaultLogging()
// Log only /api requests
CDDB
// filter { call -> call.request.path().startsWith("/api") }
}
- Remove mapper property in install StatusPages and rename funtion applyStatusConfiguration to applyDefaultStatusConfiguration
Before:
install(StatusPages) {
applyStatusConfiguration(
logger = LoggerFactory.getLogger(Application::class.java),
mapper = jacksonObjectMapper().apply {
applyDefaultConfiguration()
applyPrettyPrintConfiguration()
}
)
}
After:
install(StatusPages) {
applyDefaultStatusConfiguration(
logger = LoggerFactory.getLogger(Application::class.java)
)
}
- Remove requestTypes property for LoggingConfiguration in install JsonDataLogger
Before:
install(JsonDataLogger) {
mapperConfiguration = {
applyDefaultConfiguration()
applyPrettyPrintConfiguration()
applyJsonSecretConfiguration()
}
loggingConfiguration =
LoggingConfiguration(
responseTypes = listOf(AbstractResponse::class, CustomResponse::class),
requestTypes = listOf(Request::class)
)
}
After:
install(JsonDataLogger) {
mapperConfiguration = {
applyDefaultConfiguration()
applyPrettyPrintConfiguration()
applyJsonSecretConfiguration()
}
loggingConfiguration =
LoggingConfiguration(
responseTypes = listOf(AbstractResponse::class, CustomResponse::class)
)
}
release/0.8.1: Publish to Maven Central Repository
Fixed publish to maven central (#35)
release/0.8.0: Upgrade Kotlin, Ktor, Gradle
Kotlin 1.4.30, Ktor 1.5.1, Gradle 6.8.2