create_logger: Simple Logger

View source: R/logger.R

create_loggerR Documentation

Simple Logger

Description

Logger, in the spirit of loggers like log4j. Implemented logging levels are DEBUG, INFO, WARN, ERROR (in increasing order of specificity. Logging events can be filtered to show only events with a minimum specificity.

Usage

create_logger(con = stdout(), level = c("DEBUG", "INFO", "WARN", "ERROR"))

Arguments

con

connection to write logging data to

level

log only events of this level and those that are more specific (see details)

Value

Anonymous logging functions

Examples


logger <- create_logger(level = "INFO")
logger$info("starting specific computation")
logger$info("Today is {Sys.Date()}")

litteR documentation built on Aug. 27, 2022, 1:05 a.m.