dreamRs / shinylogs

Logs for Shiny apps

Home Page:https://dreamrs.github.io/shinylogs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Access log files for app hosted by shinyapps.io?

jrosen48 opened this issue · comments

Hi, and thanks for a great package! Can you advise on how to access log files for a Shiny app hosted by shinyapps.io? I note that I can manually download the bundle and untar the tar file to access the logs generated by shinylogs, but, I was wondering if there was a better/programmatic way to access these log files.

Note: I asked a question about this on RStudio Community: https://community.rstudio.com/t/use-shinylogs-with-shinyapps-io/72098

Actually, I am now unclear on whether the logs are being written on shinyapps.io. Do you know whether this should work with an app hosted via this service?

Hello,

That's a good question, as far as I know there's no persistent data storage on shinyapps.io, so the log will be deleted after some time.

A solution could be to send log files to a cloud storage, I haven't experiment it yet, but I can try, mayb with googledrive package ?

Victor

Thank you very much. This pointer to cloud storage is very helpful. I have been trying the s3 solution described here: https://shiny.rstudio.com/articles/persistent-data-storage.html#s3

It seems to work, except that it seems like uploading/posting the log(s) to s3 takes place before the logs for the current session are written. Is there any way to write the log files prior to code that I have in onStop()?

+1 on this, would be nice to have a write_using where users can provide their own function for saving logs. For example, to S3, a database, etc.

commented

Hi - this issue exists for RStudio Connect users as well right? I am not seeing any errors in the default RSC logs when accessing an app deployed with shinylogs, but I am not sure where the logs are actually being written to (if at all) or whether they persist between sessions (guessing not, if they're writing). The solution is still to write logs to web storage, right?

On RStudio Connect you can write on the file system, for that you need to use an absolute path. But you need to have access to the server to retrieve logs after that, so you may need to contact an administrator of your RStudio Connect server.