mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
@ -22,7 +22,7 @@ docspell.joex {
|
|||||||
logging {
|
logging {
|
||||||
# The format for the log messages. Can be one of:
|
# The format for the log messages. Can be one of:
|
||||||
# Json, Logfmt, Fancy or Plain
|
# Json, Logfmt, Fancy or Plain
|
||||||
format = "Plain"
|
format = "Fancy"
|
||||||
|
|
||||||
# The minimum level to log. From lowest to highest:
|
# The minimum level to log. From lowest to highest:
|
||||||
# Trace, Debug, Info, Warn, Error
|
# Trace, Debug, Info, Warn, Error
|
||||||
|
@ -44,16 +44,18 @@ object ScribeConfigure {
|
|||||||
_.clearHandlers(),
|
_.clearHandlers(),
|
||||||
_.withMinimumLevel(ScribeWrapper.convertLevel(cfg.minimumLevel)),
|
_.withMinimumLevel(ScribeWrapper.convertLevel(cfg.minimumLevel)),
|
||||||
l =>
|
l =>
|
||||||
|
if (logger.id == scribe.Logger.RootId) {
|
||||||
cfg.format match {
|
cfg.format match {
|
||||||
case Format.Fancy =>
|
case Format.Fancy =>
|
||||||
l.withHandler(formatter = Formatter.enhanced, writer = SystemOutWriter)
|
l.withHandler(formatter = Formatter.default, writer = SystemOutWriter)
|
||||||
case Format.Plain =>
|
case Format.Plain =>
|
||||||
l.withHandler(formatter = Formatter.classic, writer = SystemOutWriter)
|
l.withHandler(formatter = Formatter.classic, writer = SystemOutWriter)
|
||||||
case Format.Json =>
|
case Format.Json =>
|
||||||
l.withHandler(writer = JsonWriter(SystemOutWriter))
|
l.withHandler(writer = JsonWriter(SystemOutWriter))
|
||||||
case Format.Logfmt =>
|
case Format.Logfmt =>
|
||||||
l.withHandler(writer = LogfmtWriter(SystemOutWriter))
|
l.withHandler(writer = LogfmtWriter(SystemOutWriter))
|
||||||
},
|
}
|
||||||
|
} else l,
|
||||||
_.replace()
|
_.replace()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ docspell.server {
|
|||||||
logging {
|
logging {
|
||||||
# The format for the log messages. Can be one of:
|
# The format for the log messages. Can be one of:
|
||||||
# Json, Logfmt, Fancy or Plain
|
# Json, Logfmt, Fancy or Plain
|
||||||
format = "Plain"
|
format = "Fancy"
|
||||||
|
|
||||||
# The minimum level to log. From lowest to highest:
|
# The minimum level to log. From lowest to highest:
|
||||||
# Trace, Debug, Info, Warn, Error
|
# Trace, Debug, Info, Warn, Error
|
||||||
|
@ -123,6 +123,12 @@ viewItemHead texts meta =
|
|||||||
let
|
let
|
||||||
( col1, cols ) =
|
( col1, cols ) =
|
||||||
getColumns meta
|
getColumns meta
|
||||||
|
|
||||||
|
isSecond n =
|
||||||
|
n == 1
|
||||||
|
|
||||||
|
isNotLast n =
|
||||||
|
n > 1 && n < List.length cols
|
||||||
in
|
in
|
||||||
if not meta.showHeaders then
|
if not meta.showHeaders then
|
||||||
[]
|
[]
|
||||||
@ -131,7 +137,18 @@ viewItemHead texts meta =
|
|||||||
[ thead []
|
[ thead []
|
||||||
[ tr []
|
[ tr []
|
||||||
(List.map texts.itemColumn.header (col1 :: cols)
|
(List.map texts.itemColumn.header (col1 :: cols)
|
||||||
|> List.map (\n -> th [ class "text-left text-sm" ] [ text n ])
|
|> List.indexedMap
|
||||||
|
(\index ->
|
||||||
|
\n ->
|
||||||
|
th
|
||||||
|
[ class "text-left text-sm"
|
||||||
|
, classList
|
||||||
|
[ ( "hidden sm:table-cell", isSecond index )
|
||||||
|
, ( "hidden md:table-cell", isNotLast index )
|
||||||
|
]
|
||||||
|
]
|
||||||
|
[ text n ]
|
||||||
|
)
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
@ -143,12 +160,18 @@ viewItemRow texts settings meta item =
|
|||||||
( col1, cols ) =
|
( col1, cols ) =
|
||||||
getColumns meta
|
getColumns meta
|
||||||
|
|
||||||
|
isSecond n =
|
||||||
|
n == 0
|
||||||
|
|
||||||
|
isNotLast n =
|
||||||
|
n > 0 && n < (List.length cols - 1)
|
||||||
|
|
||||||
render col =
|
render col =
|
||||||
Comp.ItemColumnView.renderDiv
|
Comp.ItemColumnView.renderDiv
|
||||||
texts.templateCtx
|
texts.templateCtx
|
||||||
settings
|
settings
|
||||||
col
|
col
|
||||||
[ class "flex flex-row flex-wrap space-x-1 space-y-1" ]
|
[ class "flex flex-row break-all flex-wrap space-x-1" ]
|
||||||
item
|
item
|
||||||
|
|
||||||
td1 =
|
td1 =
|
||||||
@ -164,7 +187,10 @@ viewItemRow texts settings meta item =
|
|||||||
tdRem index col =
|
tdRem index col =
|
||||||
td
|
td
|
||||||
[ class "py-1 px-1"
|
[ class "py-1 px-1"
|
||||||
, classList [ ( "hidden md:table-cell", index > 1 ) ]
|
, classList
|
||||||
|
[ ( "hidden sm:table-cell", isSecond index )
|
||||||
|
, ( "hidden md:table-cell", isNotLast index )
|
||||||
|
]
|
||||||
]
|
]
|
||||||
[ render col
|
[ render col
|
||||||
]
|
]
|
||||||
|
@ -29,7 +29,7 @@ renderDiv ctx settings col attr item =
|
|||||||
(List.map
|
(List.map
|
||||||
(\t ->
|
(\t ->
|
||||||
div
|
div
|
||||||
[ class "label text-sm"
|
[ class "label text-sm mt-1"
|
||||||
, class <| Data.UiSettings.tagColorString2 t settings
|
, class <| Data.UiSettings.tagColorString2 t settings
|
||||||
]
|
]
|
||||||
[ text t.name ]
|
[ text t.name ]
|
||||||
|
@ -18,7 +18,7 @@ let
|
|||||||
};
|
};
|
||||||
logging = {
|
logging = {
|
||||||
minimum-level = "Info";
|
minimum-level = "Info";
|
||||||
format = "Plain";
|
format = "Fancy";
|
||||||
};
|
};
|
||||||
mail-debug = false;
|
mail-debug = false;
|
||||||
jdbc = {
|
jdbc = {
|
||||||
|
@ -23,7 +23,7 @@ let
|
|||||||
};
|
};
|
||||||
logging = {
|
logging = {
|
||||||
minimum-level = "Info";
|
minimum-level = "Info";
|
||||||
format = "Plain";
|
format = "Fancy";
|
||||||
};
|
};
|
||||||
integration-endpoint = {
|
integration-endpoint = {
|
||||||
enabled = false;
|
enabled = false;
|
||||||
|
@ -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