Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Install CallLogging
Browse files Browse the repository at this point in the history
  • Loading branch information
Slash Nephy committed Aug 21, 2018
1 parent 6b7382b commit 59b8fed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/kotlin/jp/nephy/tweetstorm/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package jp.nephy.tweetstorm
import io.ktor.application.Application
import io.ktor.application.call
import io.ktor.application.install
import io.ktor.features.CallLogging
import io.ktor.features.XForwardedHeadersSupport
import io.ktor.features.origin
import io.ktor.http.ContentType
Expand All @@ -18,13 +19,18 @@ import io.ktor.util.toMap
import jp.nephy.tweetstorm.session.AuthenticatedStream
import jp.nephy.tweetstorm.session.SampleStream
import mu.KotlinLogging
import org.slf4j.event.Level
import java.util.logging.LogManager

val logger = KotlinLogging.logger("Tweetstorm")
val config = Config.load()
val fetcher = Fetcher()

fun Application.module() {
install(CallLogging) {
level = Level.INFO
}

install(XForwardedHeadersSupport)

install(Routing) {
Expand All @@ -51,7 +57,6 @@ fun Application.module() {

fun main(args: Array<String>) {
LogManager.getLogManager().reset()
val config = Config.load()

embeddedServer(Netty, host = config.host, port = config.port, configure = {
responseWriteTimeoutSeconds = 60
Expand Down

0 comments on commit 59b8fed

Please sign in to comment.