daboross / fern

Simple, efficient logging for Rust
MIT License
848 stars 51 forks source link

Revamp examples to use env_logger-style formatting #115

Closed daboross closed 1 year ago

daboross commented 1 year ago

I think at this point it's pretty clear env_logger is the standard for Rust CLI programs. It's been this way for a while, but better late than never adapt.

The original output style in fern's examples was based on, I believe, loosely based on what Minecraft servers output at the time. Regardless, it's more useful IMO to have a consistent log style than any particular one, and env_logger's style is convenient in this way!

Side note: I'm not 100% sure the origin of this style, either. I've seen in particular some go programs outputting very similar looking log lines, and I wonder if it's more widespread, or has a particular name. I haven't been able to find one.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -19.87 :warning:

Comparison is base (fdff7e8) 58.11% compared to head (e3a4351) 38.25%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #115 +/- ## =========================================== - Coverage 58.11% 38.25% -19.87% =========================================== Files 14 5 -9 Lines 924 630 -294 =========================================== - Hits 537 241 -296 - Misses 387 389 +2 ``` | [Impacted Files](https://codecov.io/gh/daboross/fern/pull/115?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/builders.rs](https://codecov.io/gh/daboross/fern/pull/115?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2J1aWxkZXJzLnJz) | `40.14% <ø> (-0.08%)` | :arrow_down: | | [src/lib.rs](https://codecov.io/gh/daboross/fern/pull/115?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2xpYi5ycw==) | `48.64% <ø> (-1.36%)` | :arrow_down: | ... and [12 files with indirect coverage changes](https://codecov.io/gh/daboross/fern/pull/115/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.