Display R console logs on a brilliant server

I am creating a brilliant application for data analysis operations. That everything is working fine.

I want to know that there is some way to display logs, as well as what is happening in R Studio. Like the print () messages or any other R console. I need to display all this activity interactively in a brilliant application.

As with printing progress, is there a way to add progress messages rather than displaying a new message.

I searched the internee, but could not find anything in this regard.

Has anyone done this? Any help could be appreciated.

+4
source share
1 answer

, , , R R Shiny R Shiny, β†’ library (log4r)

library(log4r)
loggerDebug <- create.logger()
logfile(loggerDebug) <- 'data/debugData.log'
level(loggerDebug) <- 'INFO'

loggerServer <- create.logger()
logfile(loggerServer) <- 'data/serverData.log'
level(loggerServer) <- 'INFO'

# examples of levels
# debug(logger, 'A Debugging Message') # Won't print anything
# info(logger, 'An Info Message')
# warn(logger, 'A Warning Message')
# error(logger, 'An Error Message')
# fatal(logger, 'A Fatal Error Message')

, . (, R , )

# this depends on your security settings and rights
# talk to your UNIX ADMIN first
test <- list()
test$test <- "test"

# to change in linux / unix 
system("chmod a+rwx /...pathToYourApp..../data")
system("chmod a+rwx /...pathToYourApp..../data/debugData.log")

info(loggerDebug, paste('|   TEST   |',test$test,"|"))

# close after write (for security):
system("chmod u=-x,g-x,o-rwx /...pathToYourApp..../data")
system("chmod u=-x,g-x,o-rwx /...pathToYourApp..../data/debugData.log")

, :

system("chattr +a /...pathToYourApp..../data/debugData.log")

, . ( UNIX ADMIN)

, , RStudio , (, Sublime Text ....)

, , , ,

+6

All Articles