Merge pull request 'watchdog-be: ログを記録するように' (#15) from watchdog-be into master
Reviewed-on: #15
This commit is contained in:
commit
f69d444309
|
@ -37,6 +37,7 @@ dependencies {
|
||||||
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm")
|
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm")
|
||||||
implementation("io.ktor:ktor-server-netty-jvm")
|
implementation("io.ktor:ktor-server-netty-jvm")
|
||||||
implementation("io.ktor:ktor-server-cors")
|
implementation("io.ktor:ktor-server-cors")
|
||||||
|
implementation("io.ktor:ktor-server-call-logging")
|
||||||
implementation("ch.qos.logback:logback-classic:1.5.3")
|
implementation("ch.qos.logback:logback-classic:1.5.3")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,11 @@ import io.grpc.ServerBuilder
|
||||||
import io.ktor.http.*
|
import io.ktor.http.*
|
||||||
import io.ktor.serialization.kotlinx.json.*
|
import io.ktor.serialization.kotlinx.json.*
|
||||||
import io.ktor.server.application.*
|
import io.ktor.server.application.*
|
||||||
|
import io.ktor.server.plugins.callloging.*
|
||||||
import io.ktor.server.plugins.contentnegotiation.*
|
import io.ktor.server.plugins.contentnegotiation.*
|
||||||
import io.ktor.server.plugins.cors.routing.*
|
import io.ktor.server.plugins.cors.routing.*
|
||||||
import io.ktor.server.routing.*
|
import io.ktor.server.routing.*
|
||||||
|
import org.slf4j.event.Level
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
@ -33,6 +35,9 @@ fun Application.module() {
|
||||||
allowCredentials = true
|
allowCredentials = true
|
||||||
allowNonSimpleContentTypes = true
|
allowNonSimpleContentTypes = true
|
||||||
}
|
}
|
||||||
|
install(CallLogging){
|
||||||
|
level = Level.TRACE
|
||||||
|
}
|
||||||
|
|
||||||
val url = environment.config.property("watchdog.db.url").getString()
|
val url = environment.config.property("watchdog.db.url").getString()
|
||||||
val databaseName = environment.config.property("watchdog.db.database").getString()
|
val databaseName = environment.config.property("watchdog.db.database").getString()
|
||||||
|
|
Loading…
Reference in New Issue