R/updateOptions.R

Defines functions updateOptions.environment updateOptions.character updateOptions

Documented in updateOptions updateOptions.environment

## 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 29, 2017, 11:50 a.m.