mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-11-08 12:02:32 +01:00
filter handlebars logs
This commit is contained in:
parent
bc26bfa589
commit
f96c5e8a1e
@ -261,6 +261,13 @@ fn init_logging(level: log::LevelFilter) -> Result<(), fern::InitError> {
|
|||||||
log::LevelFilter::Off
|
log::LevelFilter::Off
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Only show handlebar logs when the level is Trace
|
||||||
|
let handlebars_level = if level >= log::LevelFilter::Trace {
|
||||||
|
log::LevelFilter::Trace
|
||||||
|
} else {
|
||||||
|
log::LevelFilter::Warn
|
||||||
|
};
|
||||||
|
|
||||||
let mut logger = fern::Dispatch::new()
|
let mut logger = fern::Dispatch::new()
|
||||||
.level(level)
|
.level(level)
|
||||||
// Hide unknown certificate errors if using self-signed
|
// Hide unknown certificate errors if using self-signed
|
||||||
@ -282,6 +289,8 @@ fn init_logging(level: log::LevelFilter) -> Result<(), fern::InitError> {
|
|||||||
.level_for("rocket::shield::shield", log::LevelFilter::Warn)
|
.level_for("rocket::shield::shield", log::LevelFilter::Warn)
|
||||||
.level_for("hyper::proto", log::LevelFilter::Off)
|
.level_for("hyper::proto", log::LevelFilter::Off)
|
||||||
.level_for("hyper::client", log::LevelFilter::Off)
|
.level_for("hyper::client", log::LevelFilter::Off)
|
||||||
|
// Filter handlebars logs
|
||||||
|
.level_for("handlebars::render", handlebars_level)
|
||||||
// Prevent cookie_store logs
|
// Prevent cookie_store logs
|
||||||
.level_for("cookie_store", log::LevelFilter::Off)
|
.level_for("cookie_store", log::LevelFilter::Off)
|
||||||
// Variable level for trust-dns used by reqwest
|
// Variable level for trust-dns used by reqwest
|
||||||
|
Loading…
Reference in New Issue
Block a user