Display errors when cli operations fail (#666)

This fixes a regression, introduced in #659, in the CLI's default output.
Since 404 & 403 errors don't trigger any logs further down the stack,
they'd exit eerily silently with the default cli loglevel.
This commit is contained in:
Euan Kemp 2022-04-01 18:49:00 -07:00 committed by GitHub
parent 134235ef7f
commit fb12a1a86b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,8 @@ fn main() {
let fmt_layer = fmt::layer().with_writer(std::io::stderr);
let filter_layer = if opt.debug() {
match EnvFilter::try_new("kanidm=debug,kanidm_client=debug,webauthn=debug") {
match EnvFilter::try_new("kanidm=debug,kanidm_client=debug,webauthn=debug,kanidm_cli=debug")
{
Ok(f) => f,
Err(e) => {
eprintln!("ERROR! Unable to start tracing {:?}", e);
@ -32,7 +33,7 @@ fn main() {
} else {
match EnvFilter::try_from_default_env() {
Ok(f) => f,
Err(_) => EnvFilter::new("kanidm_client=warn"),
Err(_) => EnvFilter::new("kanidm_client=warn,kanidm_cli=warn"),
}
};