feat: add log_level flag and utilize pretty_env_logger #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Using the
pretty_env_logger
to add some color into the application. Considered using the crate recommended in the issue but thought that using fully-featured logger would make more sense. This entailed a few changes:log
crate and an implementation of it in the form ofpretty_env_logger
.--log-level
(or-l
for short) to allow a user to define the level. Defaults toinfo
.println!()
oreprintln!()
calls to use structured calls to thepretty_env_logger
macros.Preview
Most of the changes here are visual, so here are a few example of how the CLI looks when running it.
Default log level:
The log level by default will be
info
which is intended to just display the essential information.Defined log level:
By defining the log level as
debug
we can see a lot more of the underlying processes taking place.Error output
Closes #15
Closes #3