R/updateOptions.R

## set properties of a logger or a handler
updateOptions <- function(container, ...)
  UseMethod('updateOptions')

updateOptions.character <- function(container, ...) {
  ## container is really just the name of the container
  updateOptions.environment(getLogger(container), ...)
}

updateOptions.environment <- function(container, ...) {
  ## the container is a logger
  config <- list(...);
  if (! 'level' %in% names(config))
    config[['level']] = loglevels['INFO']
  for (key in names(config))
    if(key != "") container[[key]] <- config[[key]]
  invisible()
}

Try the logging package in your browser

Any scripts or data that you put into this service are public.

logging documentation built on May 2, 2019, 4:46 p.m.