insightsengineering / tlg-catalog

A catalog of Tables, Listings and Graphs (TLGs) created with NEST R packages
https://insightsengineering.github.io/tlg-catalog/
Other
20 stars 8 forks source link

Silent logger in knitr template for teal apps #191

Closed pawelru closed 9 months ago

pawelru commented 10 months ago

https://insightsengineering.github.io/tlg-catalog/development/tables/exposure/ext01.html

image

pawelru commented 9 months ago

the most elegant way would be to wait for https://github.com/daroczig/logger/issues/138 and use teal.log_level option

averissimo commented 9 months ago

The non-elegant way would be to still use teal.log_level and detect it on {teal.logger} to mock the OFF threshold.

That is, registering as FATAL (lowest) and using a sink appender/null file instead of stdout

That would be the easiest to transition once https://github.com/daroczig/logger/issues/138 is implemented.

pawelru commented 9 months ago

I agree. However I want to avoid any changes in teal.logger just for this (if mocking you mentioned is not yet available). The approach of FATAL together with null file looks good.

averissimo commented 9 months ago

Your PR on {logger} was merged. The CRAN release will probably take some time though (2 years and some months since last)

The workaround for tlg-catalog seems fine as there won't be any FATAL level messages :+1:

pawelru commented 9 months ago

I do recall a situation when it took several months to get it released after we merge PR. I don't want to wait. Let's just move on with FATAL. We can change it then at some point