I want to log some messages to the javascript console from a Shiny application as an alternative to writing to the server-side logs. Shiny does this when an error gets thrown in the application. Is there a generic way to do this?
This worked for me when I put it in server.R:
cat("Hello world!\n", file = stderr())