Closed DanChaltiel closed 11 months ago
Thanks for reporting this!
I think this is due to reprex
not showing the stderr
that is used by default for logging, but when setting that to stdout
as part of the reprex
, it shows up, see e.g.:
library(logger);log_appender(appender_stdout); log_info(42)
#> INFO [2023-10-23 23:25:06] 42
Created on 2023-10-23 with reprex v2.0.2
Another option might be to use the std_out_err
option of reprex
, resulting in:
logger::log_info(42)
Created on 2023-10-23 with reprex v2.0.2
Nice!
It seems you are not using issues templates, but if this solves the problem maybe you could put this in a Bug issue template?
Something like:
Please include a reprex using
reprex::reprex(std_out_err=...)
great idea, thanks!
Hi,
It seems that logger cannot be used in
reprex::reprex()
.For example, here is a manual reprex from copypasting my console :
Created on 2023-10-22 with my own hands
While here is the same example using
reprex::reprex()
(no output):Created on 2023-10-22 with reprex v2.0.2
I have no idea if this is related, but it seems that
reprex::reprex()
is not allowing the use ofglobalCallingHandlers()
:Created on 2023-10-22 with reprex v2.0.2