-
Notifications
You must be signed in to change notification settings - Fork 125
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
Switch to standard logging library #218
Conversation
This allows to configure or compile away logging in the library from a single place in Rust apps. For the CLI side, the usage and output remained the same, except it's now colour-coded. Fixes shssoichiro#217.
(fixing tests) |
Fixed tests, also expanded |
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.
Thanks! Just one small nitpick
Co-Authored-By: Josh Holmer <[email protected]>
@@ -695,7 +670,7 @@ fn optimize_png( | |||
} | |||
} | |||
|
|||
eprintln!( | |||
error!( |
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.
@shssoichiro By the way, I'm not sure whether it's worth keeping this log message if it's duplicate in an actual error too (and will be printed e.g. by CLI app twice). Thoughts?
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.
I'm not entirely sure. But theoretically this should never show up, and if it does, we'll definitely want the user to be aware of it. So I think it's fine to leave it.
This allows to configure or compile away logging in the library from a single place in Rust apps.
For the CLI side, the usage and output remained the same, except it's now colour-coded.
Fixes #217.