Print diagnostic message
log_message(..., verbose = TRUE, message_type = "info", cli_model = TRUE)
Text to print.
Logical value, default is TRUE
.
Whether to print the message.
Type of message, default is info
.
Could be choose one of info
, warning
, and error
.
Logical value, default is TRUE
.
Whether to use the cli
package to print the message.
Add because the message is printed by message
,
the message could be suppressed by suppressMessages
.
log_message("Hello, ", "world!")
#> ✔ Hello, world!
suppressMessages(log_message("Hello, ", "world!"))
log_message("Hello, world!", verbose = FALSE)
log_message("Hello, world!", verbose = TRUE, message_type = "warning")
#> ! Warning: Hello, world!