#2 Logging mit kotlin-logging implementiert
This commit is contained in:
1 parent
698490a6f8
commit
4d827948f8
16 files changed
+93
-52
No files matched your search
@@ -1,14 +1,17 @@
|
||||
package net.keinekekse.app
|
||||
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.engine.*
|
||||
import io.ktor.server.netty.*
|
||||
import net.keinekekse.app.server.VERSION
|
||||
import net.keinekekse.app.server.config.configureSecurity
|
||||
|
||||
private val logger = KotlinLogging.logger {}
|
||||
|
||||
fun main() {
|
||||
// embeddedServer(Netty, port = SERVER_PORT, host = "0.0.0.0", module = Application::module)
|
||||
println("**\n** Starting ${VERSION.displayName} - ${VERSION.description} ${VERSION.fullVersion}\n**")
|
||||
logger.debug { "**\n** Starting ${VERSION.displayName} - ${VERSION.description} ${VERSION.fullVersion}\n**" }
|
||||
embeddedServer(Netty, port = 7770, host = "0.0.0.0", module = Application::module)
|
||||
.start(wait = true)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.keinekekse.app.server.config
|
||||
|
||||
import com.auth0.jwk.UrlJwkProvider
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import io.ktor.http.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.auth.*
|
||||
@@ -10,6 +11,8 @@ import io.ktor.server.routing.*
|
||||
import net.keinekekse.app.server.VERSION
|
||||
import java.net.URI
|
||||
|
||||
private val logger = KotlinLogging.logger {}
|
||||
|
||||
fun Application.configureSecurity() {
|
||||
|
||||
// TODO die Werte müssen aus der Config kommen
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
</root>
|
||||
<logger name="org.eclipse.jetty" level="INFO"/>
|
||||
<logger name="io.netty" level="INFO"/>
|
||||
</configuration>
|
||||
</configuration>
|
||||
Reference in new issue
Block a user