If the first argument for the log_* functions is a zero length vector the following error happens:
library(logger)
log_formatter(formatter_glue_or_sprintf)
log_success(character(0))
Error in regmatches(msg, gregexpr("%[0-9.+0]*[aAdifeEgGosxX]", msg))[[1]] :
subscript out of bounds
I think this can happen easily in an unpredictable way, so would be nice to handle without error. Because there is no message, for logger the best would be to output nothing (or maybe one empty line).
If the first argument for the
log_*
functions is a zero length vector the following error happens:From here: https://github.com/daroczig/logger/blob/e88153b49678227f693115d0ca19c73cf87e355a/R/formatters.R#L83
I think this can happen easily in an unpredictable way, so would be nice to handle without error. Because there is no message, for logger the best would be to output nothing (or maybe one empty line).