小编oly*_*lya的帖子

以闪亮的方式写入日志

我想保存我闪亮的应用程序(在服务器上运行)的回溯。我尝试使用 extractStackTrace() 和shiny.error(),但是回溯中最有价值的部分可能由于第二次调用 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)
Run Code Online (Sandbox Code Playgroud)

例如,我想从我的 reprex 中的回溯中获取这一行 observeEventHandler [~/app.R#16]

控制台输出

如果您能帮助我找到解决方案,我将不胜感激。

r shiny

6
推荐指数
1
解决办法
748
查看次数

标签 统计

r ×1

shiny ×1