From 62543f28c59be03f7ab17595eee06c3fee911a5c Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:15:05 +0900 Subject: [PATCH] =?UTF-8?q?watchdog-be:=20=E3=83=AD=E3=82=B0=E3=82=92?= =?UTF-8?q?=E8=A8=98=E9=8C=B2=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- watch-dog-be/build.gradle.kts | 1 + .../src/main/kotlin/dev/usbharu/unos/watchdog/be/Main.kt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/watch-dog-be/build.gradle.kts b/watch-dog-be/build.gradle.kts index d2cff88..fcff000 100644 --- a/watch-dog-be/build.gradle.kts +++ b/watch-dog-be/build.gradle.kts @@ -37,6 +37,7 @@ dependencies { implementation("io.ktor:ktor-serialization-kotlinx-json-jvm") implementation("io.ktor:ktor-server-netty-jvm") implementation("io.ktor:ktor-server-cors") + implementation("io.ktor:ktor-server-call-logging") implementation("ch.qos.logback:logback-classic:1.5.3") } diff --git a/watch-dog-be/src/main/kotlin/dev/usbharu/unos/watchdog/be/Main.kt b/watch-dog-be/src/main/kotlin/dev/usbharu/unos/watchdog/be/Main.kt index 3fe6191..b47d2d3 100644 --- a/watch-dog-be/src/main/kotlin/dev/usbharu/unos/watchdog/be/Main.kt +++ b/watch-dog-be/src/main/kotlin/dev/usbharu/unos/watchdog/be/Main.kt @@ -9,9 +9,11 @@ import io.grpc.ServerBuilder import io.ktor.http.* import io.ktor.serialization.kotlinx.json.* import io.ktor.server.application.* +import io.ktor.server.plugins.callloging.* import io.ktor.server.plugins.contentnegotiation.* import io.ktor.server.plugins.cors.routing.* import io.ktor.server.routing.* +import org.slf4j.event.Level import java.net.URI fun main(args: Array) { @@ -33,6 +35,9 @@ fun Application.module() { allowCredentials = true allowNonSimpleContentTypes = true } + install(CallLogging){ + level = Level.TRACE + } val url = environment.config.property("watchdog.db.url").getString() val databaseName = environment.config.property("watchdog.db.database").getString()