logger.debug: Python-style logging statements

View source: R/utils-logging.R

logger.debugR Documentation

Python-style logging statements

Description

After initializing the level-specific log files with logger.setup(...), this function will generate DEBUG level log statements.

Usage

logger.debug(msg, ...)

Arguments

msg

Message with format strings applied to additional arguments.

...

Additional arguments to be formatted.

Value

No return value.

Note

All functionality is built on top of the excellent futile.logger package.

See Also

logger.setup

Examples

## Not run: 
# Only save three log files
logger.setup(
  debugLog = "debug.log",
  infoLog = "info.log",
  errorLog = "error.log"
)

# But allow log statements at all levels within the code
logger.trace("trace statement #%d", 1)
logger.debug("debug statement")
logger.info("info statement %s %s", "with", "arguments")
logger.warn("warn statement %s", "about to try something dumb")
result <- try(1/"a", silent=TRUE)
logger.error("error message: %s", geterrmessage())
logger.fatal("fatal statement %s", "THE END")

## End(Not run)

MazamaCoreUtils documentation built on May 29, 2024, 4:47 a.m.