Skip to content

use macros from the log crate, issue #151 #164

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 3 commits into from
Aug 14, 2016
Merged

use macros from the log crate, issue #151 #164

merged 3 commits into from
Aug 14, 2016

Conversation

gambhiro
Copy link
Contributor

This wasn't too hard :)

Please comment if there is more to it.

@@ -42,7 +42,7 @@ impl MDBook {
pub fn new(root: &Path) -> MDBook {

if !root.exists() || !root.is_dir() {
output!("{:?} No directory with that name", root);
info!("{:?} No directory with that name", root);
Copy link
Contributor

Choose a reason for hiding this comment

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

This one could be changed to warn

@azerupi
Copy link
Contributor

azerupi commented Aug 14, 2016

Thanks for doing this!

One thing that is missing is the actual logger in the binary. We could use env_logger/ (I'm not familiar with any others). You would have to add env_logger to the dependencies and only import it in the binary (src/bin/mdbook.rs), initialize it in the main and I think it would be best to set the default log level to info.

Once you have done that it looks good enough to merge :)

@azerupi azerupi merged commit 8f8893b into rust-lang:master Aug 14, 2016
@azerupi
Copy link
Contributor

azerupi commented Aug 14, 2016

Looks good, thanks! 👍

@gambhiro gambhiro deleted the use-log-crate branch August 14, 2016 14:21
@gambhiro
Copy link
Contributor Author

It was pretty small, but thanks for the instructions. Good experience for the beginner like me.

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.

2 participants