r-lib / debugme

Easy and efficient debugging for R packages
https://r-lib.github.io/debugme/
Other
147 stars 10 forks source link

`debugme()` gains `level` argument #48

Closed krlmlr closed 3 years ago

krlmlr commented 3 years ago

This allows evaluating the message lazily, and also fixes issues with detecting the appropriate log level.

The msg argument no longer contains the "!DEBUG" header, technically it's a breaking change but maybe irrelevant?

codecov-io commented 3 years ago

Codecov Report

Merging #48 (8b26d4e) into master (136c159) will decrease coverage by 1.03%. The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #48      +/-   ##
==========================================
- Coverage   97.87%   96.84%   -1.04%     
==========================================
  Files           6        6              
  Lines         188      190       +2     
==========================================
  Hits          184      184              
- Misses          4        6       +2     
Impacted Files Coverage Δ
R/instrument.R 97.50% <83.33%> (-2.50%) :arrow_down:
R/debug.R 95.58% <100.00%> (-1.52%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 136c159...8b26d4e. Read the comment docs.

gaborcsardi commented 3 years ago

Thanks! We could still keep the header in the message, though, and then there is no breaking change, no?

krlmlr commented 3 years ago

If backward-compatibility is important, I'm sure there's a way. Is it?

We could:

Do you have a preference?

gaborcsardi commented 3 years ago

It is not actually very important, I think. Let's just merge this, and we'll see in the revdep checks...