| logger | R Documentation |
Keep track of messages printed by modules
logger(
...,
level = c("info", "warning", "error", "fatal", "debug", "trace"),
calc_delta = "auto",
.envir = parent.frame(),
.sep = "",
use_glue = FALSE,
reset_timer = FALSE
)
set_logger_path(root_path, max_bytes, max_files)
logger_threshold(
level = c("info", "warning", "error", "fatal", "debug", "trace"),
module_id,
type = c("console", "file", "both")
)
logger_error_condition(cond, level = "error")
error_notification(
cond,
title = "Error found!",
type = "danger",
class = "error_notif",
delay = 30000,
autohide = TRUE,
session = shiny::getDefaultReactiveDomain()
)
with_error_notification(expr, envir = parent.frame(), quoted = FALSE, ...)
..., .envir, .sep |
passed to |
level |
the level of message, choices are |
calc_delta |
whether to calculate time difference between current
message and previous message; default is |
use_glue |
whether to use |
reset_timer |
whether to reset timer used by |
root_path |
root directory if you want log messages to be saved to
hard disks; if |
max_bytes |
maximum file size for each logger partitions |
max_files |
maximum number of partition files to hold the log; old files will be deleted. |
module_id |
'RAVE' module identification string, or name-space; default
is |
type |
which type of logging should be set; default is |
cond |
condition to log |
class, title, delay, autohide |
passed to |
session |
shiny session |
expr |
expression to evaluate |
envir |
environment to evaluate |
quoted |
whether |
The message without time-stamps
logger("This is a message")
a <- 1
logger("A message with glue: a={a}")
logger("A message without glue: a={a}", use_glue = FALSE)
logger("Message A", calc_delta = TRUE, reset_timer = TRUE)
logger("Seconds before logging another message", calc_delta = TRUE)
# by default, debug and trace messages won't be displayed
logger('debug message', level = 'debug')
# adjust logger level, make sure `module_id` is a valid RAVE module ID
logger_threshold('debug', module_id = NULL)
# Debug message will display
logger('debug message', level = 'debug')
# Trace message will not display as it's lower than debug level
logger('trace message', level = 'trace')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.