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

Logger #38

Open
makingthematrix opened this issue Jan 14, 2018 · 1 comment
Open

Logger #38

makingthematrix opened this issue Jan 14, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@makingthematrix
Copy link
Owner

Look for a logger with logging:

  • to stdout
  • to file
  • with at least debug/warning/error levels
  • visible in results of unit tests (strangely, it's not always obvious)
  • with the ability to be optimized out in the production code (but eg. errors should stay)
@makingthematrix makingthematrix added this to the 0.1 milestone Jan 14, 2018
@makingthematrix makingthematrix self-assigned this Jan 14, 2018
@makingthematrix
Copy link
Owner Author

That wasn't hard.
The standard way to log is to use the log trait: https://docs.rs/log/0.4.1/log/
It's just an abstraction, which is super nice, because this way I can easily choose my own implementation, but keep it outside the library, so the user of the library can use another implementation if needed. I'm really glad someone thought about it.

My chosen implementation is flexi_logger: https://docs.rs/flexi_logger/0.6.13/flexi_logger/
I chose it mainly because the author made effort to explain in the docs how to connect it to log.
Merci bp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant