R/log_to_r_console.R

Defines functions log_to_r_console

#' @family low-level logging functions

log_to_r_console <- function(header,
                             body = ""
                             ) {

  if (missing(header)) stop("A header of log entry is missing.")

  message(header)

  if (body != "") {

    cat(file = stdout(), body)

  } # end of if

  return(
    paste0(header, ifelse(body != "", paste0("\n", body), "")
    )
  )

} # end of log_to_r_console()

Try the shinyEventLogger package in your browser

Any scripts or data that you put into this service are public.

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