Capture console in shiny synchronously (real time)

Is there a way to capture console output to Shiny UI synchronously?
I searched some solutions like this one. It works nicely with standard errors, but not standard out like information by print or cat.

Is there a way I can catch them all?
e.g a function:

foo <- function() {
    cat("one\n")
    Sys.sleep(3)
    print(1)
    cat("two\n")
}

if I use verbatimTextOutput, I can only see the results after everything is done. The standard error solution above is not working for this case.

Thanks

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.