Skip to contents

Also elevates the currently-open step's status to "warning" (unless it is already "error"), so the step's close line renders the elevated glyph even though the enclosing function returns normally.

Usage

log_warn(msg, close = FALSE, summary = NA)

Arguments

msg

Character scalar.

close

Logical. When TRUE, force-close the enclosing section after this line: the line is shown as the section's terminal (corner) line and its Done line is suppressed. Defaults to FALSE.

summary

Whether to record this line in the logtree_summary() digest. NA (default) records it only when it is a warning or error; TRUE always records it; FALSE never does.

Value

NULL, invisibly.

Examples

logtree_reset()
log_warn("Retry 1/3 due to timeout")
#>  Retry 1/3 due to timeout