Set if and where to send the console streams of the outsider modules.

log_set(log, val)



Output stream one of program_out, program_err, docker_out or docker_err


Either logical, file or connection.


See `sys::exec`.


# \donttest{ library(outsider.base) # Manually install example module # outsider.base contains the module in its package files pkgnm <- '' mdl_flpth <- system.file('extdata', '', package = "outsider.base") # install and import (outsider::module_install performs these tasks) pkg_install(flpth = mdl_flpth)
#> Error: Can't find ''.
image_install(pkgnm = pkgnm) # (outsider::module_import performs this task) hello_world <- utils::getFromNamespace(x = 'hello_world', ns = pkgnm)
#> Error in loadNamespace(name): there is no package called ‘’
# control the log stream # send output to file tmpfl <- tempfile() log_set(log = 'program_out', val = tmpfl) hello_world()
#> Error in hello_world(): could not find function "hello_world"
(readLines(con = tmpfl))
#> Warning: cannot open file '/tmp/RtmppUjUmQ/file487423da328': No such file or directory
#> Error in file(con, "r"): cannot open the connection
#> Warning: cannot remove file '/tmp/RtmppUjUmQ/file487423da328', reason 'No such file or directory'
#> [1] FALSE
# send docker and program output to console log_set(log = 'program_out', val = TRUE) log_set(log = 'docker_out', val = TRUE) hello_world()
#> Error in hello_world(): could not find function "hello_world"
# clean-up uninstall(pkgnm) # }