Skip to contents

A thin wrapper around logger::log_threshold() that applies the chosen level to every logger namespace used by tooltipexplorer.

Usage

app_set_log_threshold(level = logger::INFO)

Arguments

level

A logger log-level object, e.g. logger::DEBUG, logger::INFO (default), logger::WARN.

Value

Invisibly returns level.

Details

Log levels from lowest to highest verbosity: TRACE, DEBUG, INFO, SUCCESS, WARN, ERROR, FATAL. The default threshold is INFOTRACE and DEBUG lines are silent in production.

Internally, lapply() iterates over the namespace vector and calls logger::log_threshold() for each entry. The return value of lapply() is discarded; only level is returned (invisibly).

Examples

if (FALSE) { # \dontrun{
# Verbose output during development
app_set_log_threshold(logger::DEBUG)

# Quiet production mode
app_set_log_threshold(logger::WARN)
} # }