config_logger(...)
config_logger(config.file) Reads configuration R file and calls function 'customLogger' with INFO threshold
config_logger(threshold, defaultLayout) ROOT logger prints to console with threshold threshold and layout defaultLayout
config_logger(file, threshold, defaultLayout) ROOT logger prints to file with threshold threshold and layout defaultLayout
config_logger(error.file, threshold, defaultLayout) ROOT logger prints to error.file with threshold WARN and layout defaultLayout while also printing to console with threshold threshold. This is mostly for illustrative purposes Note: To use this configuration, error.file must be a named argument
config_logger(file, file.threshold, threshold, defaultLayout) ROOT logger prints to console with threshold threshold and to file with file.threshold. Both appenders use the defaultLayout
reset.options(logger.options)
config_logger()
lg <- getLogger()
lg(DEBUG, "This won't print")
lg(WARN, "But this will")
Run the code above in your browser using DataLab