write logs in shiny

Hi all!
I want to save a traceback from my shiny app (runs on a server). I tried extractStackTrace() with shiny.error(), but the most valuable part of a traceback is truncated, probably, due to a second call of captureStackTraces().

library(shiny)

options(shiny.fullstacktrace = TRUE, shiny.error = function() {
    stack_list <- extractStackTrace(sys.calls())
    print(stack_list)
})

ui <- fluidPage(
    actionButton("action", label = "Action")
)

server <- function(input, output) {
    observeEvent(input$action,{
        sum(3,"g")
    })
}

shinyApp(ui = ui, server = server)

For example, I want to get this line from traceback in my reprex.
observeEventHandler [~/app.R#16]

I would appreciate it if you could help me to find a solution.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.