Learn R Programming

shinyEventLogger (version 0.1.1)

log_init: Initialize logging to JavaScript console

Description

log_init should be put into the shiny ui to initialize JavaScript code that enables logging to JavaScript console in an Internet browser.

Usage

log_init()

Arguments

Value

A tagList with script tag inside head tag.

Examples

Run this code
# NOT RUN {
if (interactive()) {
  set_logging(js_console = TRUE)
  shiny::shinyApp(
    ui = shiny::fluidPage(log_init()),
    server = function(input, output) {
      set_logging_session()
      log_event("See browser JavaScript console (CTRL + SHIFT + I)")
    }
  )
}
# }

Run the code above in your browser using DataLab