configLogger(..., threshold = INFO, defaultLayout = simpleLayout)configLogger(config.file) Reads configuration R file and calls function 'customLogger' with INFO threshold
configLogger(threshold, defaultLayout) ROOT logger prints to console with threshold threshold and layout defaultLayout
configLogger(file, threshold, defaultLayout) ROOT logger prints to file with threshold threshold and layout defaultLayout
configLogger(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
configLogger(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)
configLogger()
lg <- getLogger()
lg(DEBUG, "This won't print")
lg(WARN, "But this will")Run the code above in your browser using DataLab