Skip to content

Log errors by default #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Log errors by default #197

merged 1 commit into from
Apr 22, 2024

Conversation

tamird
Copy link
Member

@tamird tamird commented Apr 19, 2024

Remove imperative clap::Error::exit.

@tamird tamird requested a review from vadorovsky April 19, 2024 06:58
@tamird
Copy link
Member Author

tamird commented Apr 19, 2024

@vadorovsky looks like eff4440 accidentally lost logging if an explicit level was not passed to the CLI.

Copy link
Member

@vadorovsky vadorovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, happy to see the custom error function to be gone and replaced with anyhow! So far it looks good, I'm just going to try it a bit before approving.

@tamird
Copy link
Member Author

tamird commented Apr 19, 2024

Go ahead and merge when you're satisfied.

Copy link
Collaborator

@alessandrod alessandrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but let's let @vadorovsky try what he wants to try.

As per comment I wouldn't add a new dep tho.

error(&e.to_string(), clap::error::ErrorKind::Format);
}
}
either::for_both!(subscriber, s => tracing::subscriber::set_global_default(s))?;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless it's already in the dep tree, it doesn't seem worth adding a new dep just for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look at Cargo.lock; it's already in there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a dev dependency right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, removed.

Remove imperative `clap::Error::exit`.
@vadorovsky vadorovsky merged commit 373ae3e into aya-rs:main Apr 22, 2024
10 checks passed
@tamird tamird deleted the better-logs branch April 22, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants