log_message: Logging a message

Description Usage Arguments Functions See Also Examples

View source: R/log_wrappers.R

Description

log_message, log_warning, and log_error are wrapper functions for logging events of type MESSAGE, WARNING, or ERROR. Relevant message, warning or error is raised after logging an event. Raising an error is done using stop function and it can stop the whole shiny app.

Usage

1
2
3
4
5

Arguments

...

Objects that are evaluated, coerced into character string, collapsed and pasted as event name into log entry header. The character string is also passed to the message, warning, or error raised.

Functions

See Also

Other logging events functions: log_event, log_output, log_started, log_test, log_value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
if (interactive()) {
  set_logging()
  shiny::shinyApp(
    ui = shiny::fluidPage(log_init()),
    server = function(input, output) {
      set_logging_session()
      log_message("Example of a message")
      log_warning("Example of a warning")
      log_error("Example of an error")
    }
  )
}

shinyEventLogger documentation built on May 1, 2019, 9:26 p.m.