Is there some function I'm supposed to include to see the logs in a Shiny server. I'm getting " Forbidden
You don't have permission to access /App_test-shiny-20180803-040333-34374.log on this server."
Also, the code works fine in local and gets disconnected in server when certain inputs are provided.
I don't have a lot of experience with Shiny Server in general, but from the description of your problem it looks like it is not necessarily relevant. Usually, you'll see "Forbidden" when your user doesn't have enough privileges to perform certain action.
Did you start your Shiny Server with superuser privileges (something like sudo <start_shiny_server>)? Does the user you are trying to see logs with has these privileges? Can you switch to superuser (sudo su) and try command again?