log_message: Send a standardized log message to stdout or stderr

View source: R/log-core.R

log_messageR Documentation

Send a standardized log message to stdout or stderr

Description

log_message() does not stop the execution of the script, regardless of the level of the message, and whether or not it prints to STDOUT or STDERR.

Usage

log_message(message, level = "INFO", out_or_err = "OUT")

Arguments

message

A string containing a message to log.

level

The level of the message (e.g. INFO, WARNING, ERROR), defaults to "INFO" but will accept any string.

out_or_err

Send log output to stdout or stderr, choices are "OUT" or "ERR" and the defaults is "OUT".

Value

A message printed to stdout or stderr and an invisible character string copy of the entire log message.

See Also

Other log: log_error(), log_total_time(), survey_log()

Examples

log_message("This is an info message", "INFO", "OUT")
log_message("This is an error message", "ERROR", "ERR")
log_message("This is a warning message", "WARNING", "OUT")

strata documentation built on April 12, 2025, 2:20 a.m.