mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Fix logger configuration
This commit is contained in:
@ -44,16 +44,18 @@ object ScribeConfigure {
|
|||||||
_.clearHandlers(),
|
_.clearHandlers(),
|
||||||
_.withMinimumLevel(ScribeWrapper.convertLevel(cfg.minimumLevel)),
|
_.withMinimumLevel(ScribeWrapper.convertLevel(cfg.minimumLevel)),
|
||||||
l =>
|
l =>
|
||||||
cfg.format match {
|
if (logger.id == scribe.Logger.RootId) {
|
||||||
case Format.Fancy =>
|
cfg.format match {
|
||||||
l.withHandler(formatter = Formatter.enhanced, writer = SystemOutWriter)
|
case Format.Fancy =>
|
||||||
case Format.Plain =>
|
l.withHandler(formatter = Formatter.default, writer = SystemOutWriter)
|
||||||
l.withHandler(formatter = Formatter.classic, writer = SystemOutWriter)
|
case Format.Plain =>
|
||||||
case Format.Json =>
|
l.withHandler(formatter = Formatter.classic, writer = SystemOutWriter)
|
||||||
l.withHandler(writer = JsonWriter(SystemOutWriter))
|
case Format.Json =>
|
||||||
case Format.Logfmt =>
|
l.withHandler(writer = JsonWriter(SystemOutWriter))
|
||||||
l.withHandler(writer = LogfmtWriter(SystemOutWriter))
|
case Format.Logfmt =>
|
||||||
},
|
l.withHandler(writer = LogfmtWriter(SystemOutWriter))
|
||||||
|
}
|
||||||
|
} else l,
|
||||||
_.replace()
|
_.replace()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ object TestSettingsPlugin extends AutoPlugin {
|
|||||||
|
|
||||||
val testSettings = Seq(
|
val testSettings = Seq(
|
||||||
libraryDependencies ++= inTest(Dependencies.munit, Dependencies.scribe),
|
libraryDependencies ++= inTest(Dependencies.munit, Dependencies.scribe),
|
||||||
testFrameworks += new TestFramework("munit.Framework")
|
testFrameworks += TestFrameworks.MUnit
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user