aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorStefan Melmuk <[email protected]>2023-09-06 12:40:55 +0200
committerMathijs van Veluw <[email protected]>2023-10-07 16:24:21 +0200
commitf96c5e8a1e6a8afb2711141db5835de4b8813f50 (patch)
treef3aeb7327381c6eaea42c8a527de1ae479ee24e8 /src/main.rs
parentbc26bfa589c007da9b9be37e1172060f38a948b9 (diff)
downloadvaultwarden-f96c5e8a1e6a8afb2711141db5835de4b8813f50.tar.gz
vaultwarden-f96c5e8a1e6a8afb2711141db5835de4b8813f50.zip
filter handlebars logs
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 33d802ee..c200cf12 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -261,6 +261,13 @@ fn init_logging(level: log::LevelFilter) -> Result<(), fern::InitError> {
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()
.level(level)
// 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("hyper::proto", log::LevelFilter::Off)
.level_for("hyper::client", log::LevelFilter::Off)
+ // Filter handlebars logs
+ .level_for("handlebars::render", handlebars_level)
// Prevent cookie_store logs
.level_for("cookie_store", log::LevelFilter::Off)
// Variable level for trust-dns used by reqwest