daroczig / logger

A lightweight, modern and flexible, log4j and futile.logger inspired logging utility for R
https://daroczig.github.io/logger
280 stars 41 forks source link

Remove duplicated condition after it being logged #100

Closed DanChaltiel closed 10 months ago

DanChaltiel commented 2 years ago

When you log a warning or an error, the condition is thrown again after the log message.

Therefore, here is a pull request to muffle these unnecessary messages.

I think it is really interesting for warnings, but I might have been carried away with errors, it might be not that useful. The getOptions() part also.

daroczig commented 10 months ago

thanks! sorry that it took "some" time to take a look :zipper_mouth_face: I've pushed some code style updates and merging after the CI/CD tests run

codecov[bot] commented 10 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (cc4b608) 80.76% compared to head (f36d54d) 82.39%. Report is 18 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #100 +/- ## ========================================== + Coverage 80.76% 82.39% +1.62% ========================================== Files 10 10 Lines 520 551 +31 ========================================== + Hits 420 454 +34 + Misses 100 97 -3 ``` | [Files](https://app.codecov.io/gh/daroczig/logger/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Gergely+Dar%C3%B3czi) | Coverage Δ | | |---|---|---| | [R/hooks.R](https://app.codecov.io/gh/daroczig/logger/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Gergely+Dar%C3%B3czi#diff-Ui9ob29rcy5S) | `56.89% <50.00%> (+34.67%)` | :arrow_up: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/daroczig/logger/pull/100/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Gergely+Dar%C3%B3czi)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.