Learn R Programming

strata (version 1.4.3)

log_message: 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")

Value

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

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".

See Also

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

Examples

Run this code
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")

Run the code above in your browser using DataLab