mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-04 10:29:34 +00:00
Update scribe, scribe-slf4j to 3.10.0
This commit is contained in:
parent
42081cc3b0
commit
0fa543121f
@ -12,6 +12,7 @@ import cats.effect.Sync
|
||||
import docspell.logging.{Level, LogEvent, Logger}
|
||||
|
||||
import scribe.LoggerSupport
|
||||
import scribe.data.{MDC, MDCMap}
|
||||
import scribe.message.LoggableMessage
|
||||
|
||||
private[logging] object ScribeWrapper {
|
||||
@ -38,13 +39,24 @@ private[logging] object ScribeWrapper {
|
||||
case Level.Trace => scribe.Level.Trace
|
||||
}
|
||||
|
||||
private[this] def emptyMDC: MDC =
|
||||
new MDCMap(None)
|
||||
|
||||
private[this] def convert(ev: LogEvent) = {
|
||||
val level = convertLevel(ev.level)
|
||||
val additional: List[LoggableMessage] = ev.additional.map {
|
||||
case Right(ex) => LoggableMessage.throwable2Message(ex)
|
||||
case Left(msg) => LoggableMessage.string2Message(msg)
|
||||
}.toList
|
||||
LoggerSupport(level, ev.msg() :: additional, ev.pkg, ev.fileName, ev.name, ev.line)
|
||||
LoggerSupport(
|
||||
level,
|
||||
ev.msg() :: additional,
|
||||
ev.pkg,
|
||||
ev.fileName,
|
||||
ev.name,
|
||||
ev.line,
|
||||
emptyMDC
|
||||
)
|
||||
.copy(data = ev.data.toDeferred)
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ object Dependencies {
|
||||
val PureConfigVersion = "0.17.1"
|
||||
val ScalaJavaTimeVersion = "2.4.0"
|
||||
val ScodecBitsVersion = "1.1.34"
|
||||
val ScribeVersion = "3.9.0"
|
||||
val ScribeVersion = "3.10.0"
|
||||
val Slf4jVersion = "1.7.36"
|
||||
val SourcecodeVersion = "0.2.8"
|
||||
val StanfordNlpVersion = "4.4.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user