I'm using R/RStudio on CentOS platform. I need to see if the binary log file (/var/log/messages
) contains further information regarding a graphics device plotting issue, but I cannot read it from within RStudio.
I cannot find any information on the community support troubleshooting pages. The Help Menu -> Diagnostics -> ... does not indicate a 'Show Log Files' option. Can someone advise how this file can be accessed, preferably from within RStudio?
By default
/var/log/messages
is not readable by all users, so the first thing you need to do is make it accessible to whatever user you're logged in as in RStudio. This question has details and ideas:https://serverfault.com/questions/258827/what-is-the-most-secure-way-to-allow-a-user-read-access-to-a-log-file
Once your user account has permissions to
/var/log/messages
, you can use something like the following to show it in RStudio:(You could also try
file.edit("/var/log/messages")
to open it in an editor buffer, but that is less likely to succeed.)