watchdog-be: ログを記録するように
/ build-tool (pull_request) Has been skipped Details
/ build-angular (pull_request) Has been skipped Details
/ build-watchdog-be (pull_request) Successful in 3m7s Details
/ build-docker-image (pull_request) Has been skipped Details

This commit is contained in:
usbharu 2024-03-14 16:15:05 +09:00
parent c472acee43
commit 62543f28c5
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
2 changed files with 6 additions and 0 deletions

View File

@ -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")
}

View File

@ -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<String>) {
@ -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()