mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
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:
parent
134235ef7f
commit
fb12a1a86b
|
@ -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"),
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue