Skip to contents

Internally used infrastructure for emitting log messages is exported, hoping that other packages which depend on this, use it and thereby logging is carried out consistently both in terms of presentation and output device. All log messages are associated with an (ordered) level ("fatal", "error", "warn", "info", "debug" or "trace") which is compared against the currently set value (available as get_log_level()) and output is only generated if the message level is greater or equal to the currently set value.

Usage

write_log(..., level = "info")

log_fatal(...)

log_error(...)

log_warn(...)

log_info(...)

log_debug(...)

log_trace(...)

as_log_level(level)

get_log_level()

cnd_logger(msg, level)

cat_logger(msg, level)

Arguments

...

Concatenated as paste0(..., "\n")

level

Logging level (possible values are "fatal", "error", "warn", "info", "debug" and "trace"

msg

Message (string)

Value

Logging function write_log(), wrappers log_*() and loggers provided as cnd_logger()/cat_logger() all return NULL invisibly and are called for their side effect of emitting a message. Helpers as_log_level() and get_log_level() return a scalar-valued ordered factor.