Quick and easy way to configure the root logger for logging to a file.
basic_config(file = NULL, fmt = "%L [%t] %m",
timestamp_fmt = "%Y-%m-%d %H:%M:%OS3", threshold = "info",
appenders = NULL, console = if (is.null(appenders)) "all" else FALSE,
console_fmt = "%L [%t] %m %f",
console_timestamp_fmt = "%H:%M:%OS3", memory = FALSE)
character
scalar: If not NULL
a AppenderFile will be
created that logs to this file. If the filename ends in .jsonl
, the
Appender will be set up to use the JSON Lines format instead of plain text (see
AppenderFile and AppenderJson).
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)
see format.POSIXct()
character
or integer
scalar. The minimum log level that should be processed by the root logger.
a single Appender or a list thereof.
logical
scalar or a threshold
(see above). Add an appender
logs to the console (i.e. displays messages in an interactive R session)
character
scalar: like fmt
but used for console output
character
scalar: like timestamp_fmt
but
used for console output
logical
scalar. or a threshold
(see above). Add an Appender
that logs to a memory buffer, see also show_log()
and AppenderBuffer
the root
Logger (lgr)