Skip to content
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

Deprecate env_logger::from_env and clean up examples #168

Merged
merged 1 commit into from Jul 23, 2020

Conversation

KodrAus
Copy link
Collaborator

@KodrAus KodrAus commented Jul 19, 2020

The env_logger::builder and env_logger::from_env methods are a bit confusing as-is, because it's not clear that env_logger::builder should call Builder::from_default_env instead of Builder::new. The builder function is a convenient way to get started configuring your logger before initializing it, but the from_env method doesn't actually save you any work because you still need to use env_logger::Env, so may as well use env_logger::{Builder, Env} while you're at it.

I've also cleaned up our examples a bit and added a new one for logging in cargo test.

@KodrAus KodrAus requested a review from mainrs July 19, 2020 23:07
Copy link
Contributor

@mainrs mainrs left a comment

Choose a reason for hiding this comment

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

Lint is unrelated to the PR.

src/lib.rs Show resolved Hide resolved
@KodrAus
Copy link
Collaborator Author

KodrAus commented Jul 19, 2020

I'll fix up that lint while I'm here.

@mainrs
Copy link
Contributor

mainrs commented Jul 19, 2020

I'll fix up that lint while I'm here.

Started on #169. Some more popped up after that. You should be able to push to that Pr since you’re maintainer.

@mainrs
Copy link
Contributor

mainrs commented Jul 22, 2020

Anything you want to add to the PR @KodrAus? Else this can be merged.

@KodrAus KodrAus merged commit 0ef5cff into rust-cli:master Jul 23, 2020
@KodrAus KodrAus deleted the chore/build-fn-cleanup branch July 23, 2020 02:30
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.

None yet

2 participants