watchdog-be: ログを記録するように #15

Merged
usbharu merged 1 commits from watchdog-be into master 2024-03-14 07:15:34 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 62543f28c5 - Show all commits

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()