Nothing
## init storage for all logger settings
namespaces <- new.env()
.onLoad <- function(libname, pkgname) {
## default namespace's logger settings
namespaces$global <- list(
## there can be multiple loggers for a namespace
default = list(
threshold = as.loglevel(Sys.getenv('LOGGER_LOG_LEVEL', unset = 'INFO')),
layout = layout_simple,
formatter = formatter_sprintf,
appender = appender_console))
if (requireNamespace('glue', quietly = TRUE)) {
log_formatter(formatter_glue, namespace = 'global', index = 1)
}
## internal namespace for debugging logger
namespaces$.logger <- list(
default = list(
threshold = ERROR,
layout = layout_simple,
formatter = formatter_sprintf,
appender = appender_console))
}
.onAttach <- function(libname, pkgname) {
## warn user about using sprintf instead of glue due to missing dependency
if (!requireNamespace('glue', quietly = TRUE)) {
packageStartupMessage('logger: As the "glue" R package is not installed, using "sprintf" as the default log message formatter instead of "glue".')
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.