A wrapper around rlang::inform()
for providing feedback to developers using
this packages functions.
inform(...)
Arguments passed on to rlang::inform
message
The message to display, formatted as a bulleted
list. The first element is displayed as an alert bullet
prefixed with !
by default. Elements named "*"
, "i"
, "v"
,
"x"
, and "!"
are formatted as regular, info, success,
failure, and error bullets respectively. See Formatting messages with cli
for more about bulleted messaging.
If a message is not supplied, it is expected that the message is
generated lazily through cnd_header()
and cnd_body()
methods. In that case, class
must be supplied. Only inform()
allows empty messages as it is occasionally useful to build user
output incrementally.
If a function, it is stored in the header
field of the error
condition. This acts as a cnd_header()
method that is invoked
lazily when the error message is displayed.
class
Subclass of the condition.
body,footer
Additional bullets.
use_cli_format
Whether to format message
lazily using
cli if available. This results in
prettier and more accurate formatting of messages. See
local_use_cli()
to set this condition field by default in your
package namespace.
If set to TRUE
, message
should be a character vector of
individual and unformatted lines. Any newline character "\\n"
already present in message
is reformatted by cli's paragraph
formatter. See Formatting messages with cli.
.file
A connection or a string specifying where to print the
message. The default depends on the context, see the stdout
vs
stderr
section.
.subclass
This argument
was renamed to
class
in rlang 0.4.2 for consistency with our
conventions for class constructors documented in
https://adv-r.hadley.nz/s3.html#s3-subclassing.
.frequency
How frequently should the warning or message be
displayed? By default ("always"
) it is displayed at each
time. If "regularly"
, it is displayed once every 8 hours. If
"once"
, it is displayed once per session.
.frequency_id
A unique identifier for the warning or
message. This is used when .frequency
is supplied to recognise
recurring conditions. This argument must be supplied if
.frequency
is not set to "always"
.
feedback in console