Docker containers can be configured on AWS to send anything that appears in stdout
to be sent to a centralized logging service. This is a neat trick, if you pri
Unfortunately there is no way to log into stdout directly yet. However there is an approach to listen to the filesystem changes and print the logs properly.
You can use e.g. xtail
(which is available as a debian package) and listen to the server log folder changes. E.g.
# start shiny server in detached mode
exec shiny-server 2>&1 &
# push the "real" application logs to stdout with xtail
exec xtail /var/log/shiny-server/
I also prepared this as a pull request to the rocker/shiny Docker image. Regardless of the result you can use it in your docker images.
This is a supported feature as of Shiny Server 1.5.13. You can set the environment variable SHINY_LOG_STDERR=1
(for example, using an ENV
statement in your Dockerfile) to enable this behavior.
https://docs.rstudio.com/shiny-server/#logging-to-standard-error