Learn R Programming

lgr (version 0.2.0)

basic_config: Basic Setup for the Logging System

Description

Quick and easy way to configure the root logger for logging to a file

Usage

basic_config(file = NULL, fmt = NULL,
  timestamp_fmt = "%Y-%m-%d %H:%M:%OS3", threshold = NA,
  appenders = NULL)

Arguments

file

character scalar: If not NULL a AppenderFile will be created that logs to this file. If the filename ends in .jsonl an AppenderJson will be created instead.

fmt

character scalar: Format to use if file is supplied and not a .jsonl file. If NULL it defaults to "%L [%t] %m" (see format.LogEvent)

timestamp_fmt
threshold

character or integer scalar. The minimum log level that should be processed by the root logger.

appenders

a single Appender or a list thereof. Must be NULL if if file is already specified.

Value

NULL (invisibly)

Examples

Run this code
# NOT RUN {
make the root logger log to a file
basic_config(file = tempfile())
# }

Run the code above in your browser using DataLab