Retrieves the contents of the SLC log file from the most recent SLC submission
Value
Log contents as character vector or list
A character vector containing the log contents, or a list of logs if type="all"
Examples
if (FALSE) { # \dontrun{
# Initialize connection and run some code
conn <- slc_init()
slc_submit("data test; x = 1; run;", conn)
# Get all log output
logs <- get_slc_log(conn, "all")
str(logs)
# Get only the log portion
log_only <- get_slc_log(conn, "log")
cat(log_only, sep = "\n")
# Get only error/listing output
errors <- get_slc_log(conn, "error")
# Using automatic connection
slc_submit("proc print data=sashelp.class; run;")
recent_logs <- get_slc_log(type = "all")
} # }
# Example of log types
if (FALSE) {
conn <- slc_init()
# Run code that generates log output
slc_submit("data example; x = 1; y = x * 2; run;", conn)
# Different ways to access logs
all_output <- get_slc_log(conn, "all") # Both log and listing
log_output <- get_slc_log(conn, "log") # Just the log
lst_output <- get_slc_log(conn, "error") # Just the listing
}
if (FALSE) { # \dontrun{
# Initialize connection
conn <- slc_init()
# Run some SLC code
slc_submit("proc print data=sashelp.class;", conn)
# Get all logs
logs <- get_slc_log(conn)
str(logs)
# Get only the main log
main_log <- get_slc_log(conn, type = "log")
cat(main_log)
# Get only the listing output
error_log <- get_slc_log(conn, type = "lst")
cat(error_log)
# Can also be used without explicit connection
logs <- get_slc_log(type = "all")
} # }