change logging level for mongodb
All checks were successful
Build & Publish / build (push) Successful in 4m5s
All checks were successful
Build & Publish / build (push) Successful in 4m5s
This commit is contained in:
parent
fd2eafac95
commit
dad1adf8ac
2 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
package dev.jansel.feixiao
|
||||
|
||||
import ch.qos.logback.classic.Level
|
||||
import ch.qos.logback.classic.LoggerContext
|
||||
import com.github.twitch4j.TwitchClient
|
||||
import dev.jansel.feixiao.extensions.EventHooks
|
||||
import dev.jansel.feixiao.extensions.StreamerCommand
|
||||
|
@ -9,12 +11,16 @@ import dev.jansel.feixiao.utils.twitch
|
|||
import dev.kordex.core.ExtensibleBot
|
||||
import dev.kordex.core.i18n.SupportedLocales
|
||||
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||
import org.slf4j.LoggerFactory
|
||||
|
||||
var twitchClient: TwitchClient? = null
|
||||
val logger = KotlinLogging.logger { }
|
||||
var botRef: ExtensibleBot? = null
|
||||
|
||||
suspend fun main() {
|
||||
val loggerContext = LoggerFactory.getILoggerFactory() as LoggerContext
|
||||
val rootLogger = loggerContext.getLogger("org.mongodb.driver")
|
||||
rootLogger.level = Level.OFF
|
||||
botRef = ExtensibleBot(token) {
|
||||
database(true)
|
||||
twitch(true)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package dev.jansel.feixiao.database
|
||||
|
||||
import com.mongodb.ConnectionString
|
||||
import com.mongodb.LoggerSettings
|
||||
import com.mongodb.MongoClientSettings
|
||||
import dev.jansel.feixiao.utils.mongoUri
|
||||
import org.bson.UuidRepresentation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue