powered by
This function sets a hook to trigger log_warn() when warning is called to log the warning messages with the global logger layout and appender.
log_warn()
warning
logger
log_warnings(muffle = getOption("logger_muffle_warnings", FALSE))
if TRUE, the warning is not shown after being logged
if (FALSE) { log_warnings() for (i in 1:5) { Sys.sleep(runif(1)) warning(i) } }
Run the code above in your browser using DataLab