get_log: Get Job Log

View source: R/content.R

get_logR Documentation

Get Job Log

Description

Get the log output for a job. Requires Connect 2022.10.0 or newer.

Usage

get_log(job, max_log_lines = NULL)

Arguments

job

A job, represented by an element from the list returned by get_job_list().

max_log_lines

Optional. An integer indicating the maximum number of log lines to return. If NULL (default), Connect returns a maximum of 5000 lines.

Details

Note: The output of get_jobs() cannot be used with get_log(). Please use an object from the list returned by get_job_list().

Value

A data frame with the requested log. Each row represents an entry.

  • source: stdout or stderr

  • timestamp: The time of the entry.

  • data: The logged text.

See Also

Other job functions: get_job(), get_jobs(), terminate_jobs()

Other content functions: content_delete(), content_item(), content_title(), content_update(), create_random_name(), dashboard_url(), dashboard_url_chr(), delete_thumbnail(), delete_vanity_url(), deploy_repo(), get_bundles(), get_environment(), get_image(), get_job(), get_jobs(), get_thumbnail(), get_vanity_url(), git, has_thumbnail(), permissions, set_image_path(), set_run_as(), set_thumbnail(), set_vanity_url(), swap_vanity_url(), swap_vanity_urls(), terminate_jobs(), verify_content_name()

Examples

## Not run: 
client <- connect()
item <- content_item(client, "951bf3ad-82d0-4bca-bba8-9b27e35c49fa")
jobs <- get_job_list(item)
log <- get_log(jobs[[1]])

## End(Not run)



rstudio/connectapi documentation built on Feb. 14, 2025, 2:10 a.m.