lg <- get_logger("test")
analyse <- function(){
lg$add_filter(FilterForceLevel$new("info"), "force")
on.exit(lg$remove_filter("force"))
lg$error("an error with forced log level INFO")
}
analyse()
lg$error("an normal error")
lg$config(NULL) # reset config
Run the code above in your browser using DataLab