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 print appropriate JSON to stdout then you can automate large parts of your logging pipeline without having to worry about files.
I'd love to get this working with shiny-server
in a docker container. But getting something printed to stdout
seems rather tricky. The server automatically places everything in a logfile, which is exactly what I do not want it to do. Is it possible for shiny-server to log to stdout instead of a file?
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.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.