-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add "Log messages with a custom logger" recipe #74
Conversation
@rap2hpoutre Hi there was no deed to close the original PR as you could have just Anyhow. Your pull looks very good 😃 . Minor suggestions:
|
@budzik Thanks! Once again I would like your recommandations. What about this textual description:
Source: https://doc.rust-lang.org/log/log/index.html#logger-implementations For the other suggestion, I think you are right but I think we do not need "impl", just "Log messages with a custom logger" |
I would suggest to make the text a little more concise and in passive voice.
As to your suggestion "Log messages with a custom logger" looks awesome to me. For future reference, I would just push updated PR and ask for review instead of posting suggested text inline. It will be easier and less noisy on the thread :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there :)
- forgotten to update master table in intro.md
- use ex-log-custom
Please use try to use git commit --amend
and then git push --force
to update history without new commit.
src/app.md
Outdated
@@ -5,7 +5,7 @@ | |||
| [Parse command line arguments][ex-clap-basic] | [![clap-badge]][clap] | [![cat-command-line-badge]][cat-command-line] | | |||
| [Log a debug message to the console][ex-log-debug] | [![log-badge]][log] [![env_logger-badge]][env_logger] | [![cat-debugging-badge]][cat-debugging] | | |||
| [Log an error message to the console][ex-log-error] | [![log-badge]][log] [![env_logger-badge]][env_logger] | [![cat-debugging-badge]][cat-debugging] | | |||
| [Log messages in a custom format][ex-log-custom] | [![log-badge]][log] | [![cat-debugging-badge]][cat-debugging] | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ex-log-custom was ok no need to change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact I actually had to change ex-log-custom
because it was already in use below and I used ex-log-logger
everywhere else. I commited (with --amend).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then use ex-log-custom-logger
;) ex-log-logger
is not really informative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I just changed from ex-log-custom-logger
to ex-log-logger
Looks good to me 👌. Great work! I assure you that it was painful only the first time :) @rap2hpoutre Do you feel upto creating the the minimal |
Thank YOU for all the time you offered me. I learned A LOT! And I am slow so thanks for your patience.
Not today I think, maybe after the weekend. I think I will do this in a new PR because I can't say "yes I will do this in X hours/days", I have no idea right now. But I will continue to contribute and hope I will become a better contributor. |
Nicely done! |
This recipe shows how to create a custom logger and log various messages into it. Based on #69 and is a part of #61
Side note:
Too many errors and mistakes were made in https://github.com/brson/rust-cookbook/pull/69 (and it's now in conflit with commit like "oops", so its quality is poor). Now with the help of @dtolnay and @budziq I re-created a clean (?) PR based on this todo-list https://github.com/brson/rust-cookbook/pull/69#issuecomment-300814527