Exporting custom Shiny-Log Files

I was wondering if I could write my own Log-files and export them back to the hosting machine of shinyproxy?

I am already using

container-log-path: ./container-logs

and

logging:
  file:
    /logs/shinyproxy.log

for the normal log files of the shinyApp and shinyproxy, but I need to create a custom log-file with logs of certain interactions.

Inside the shiny-server I have several lines like this

write("custom interaction log", file = "interaction.log", append = TRUE)

and I was wondering how to export the resulting interaction.log file from the container to the hosting machine, before the container is shutdown?

By using volumes!

In the application.yml under the proxy-specs I defined the following line:

container-volumes: "host/logdir:container/logdir"

and I changed the write location to:

write("custom interaction log", file = "container/logdir/interaction.log", append = TRUE)

Which will save the interaction.log on the host machine under host/logdir/interaction.log

1 Like