Auto merge of #12108 - Veykril:simplify, r=Veykril

minor: Record snippet config errors
This commit is contained in:
bors 2022-04-28 13:18:35 +00:00
commit d382e24a11
3 changed files with 8 additions and 3 deletions

View File

@ -584,7 +584,12 @@ impl Config {
scope,
) {
Some(snippet) => self.snippets.push(snippet),
None => tracing::info!("Invalid snippet {}", name),
None => errors.push((
format!("snippet {name} is invalid"),
<serde_json::Error as serde::de::Error>::custom(
"snippet path is invalid or triggers are missing",
),
)),
}
}

View File

@ -290,7 +290,7 @@ impl GlobalState {
}
let duration = start.elapsed();
tracing::info!("handled {} - ({}) in {:0.2?}", method, response.id, duration);
tracing::debug!("handled {} - ({}) in {:0.2?}", method, response.id, duration);
self.send(response.into());
}
}

View File

@ -314,7 +314,7 @@ impl GlobalState {
self.prime_caches_queue.op_completed(());
if cancelled {
self.prime_caches_queue
.request_op("restart after cancelation".to_string());
.request_op("restart after cancellation".to_string());
}
}
};