lg <- get_logger("test")
analyse <- function(){
lg$add_filter(FilterInject$new(type = "analysis"), "inject")
on.exit(lg$remove_filter("inject"))
lg$error("an error with forced custom 'type'-field")
}
analyse()
lg$error("an normal error")
lg$config(NULL) # reset config
Run the code above in your browser using DataLab