{"id":14068906,"url":"https://github.com/krlmlr/tee","last_synced_at":"2025-04-15T15:09:29.077Z","repository":{"id":66206737,"uuid":"128385717","full_name":"krlmlr/tee","owner":"krlmlr","description":"Log all process output to a file, for R","archived":false,"fork":false,"pushed_at":"2018-04-06T12:52:04.000Z","size":13,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T15:09:23.033Z","etag":null,"topics":["logging","r"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krlmlr.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-06T11:23:52.000Z","updated_at":"2025-04-10T22:44:39.000Z","dependencies_parsed_at":"2023-06-29T08:15:13.797Z","dependency_job_id":null,"html_url":"https://github.com/krlmlr/tee","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Ftee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Ftee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Ftee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krlmlr%2Ftee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krlmlr","download_url":"https://codeload.github.com/krlmlr/tee/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094932,"owners_count":21211837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logging","r"],"created_at":"2024-08-13T07:06:28.592Z","updated_at":"2025-04-15T15:09:29.053Z","avatar_url":"https://github.com/krlmlr.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# tee\n\nThe goal of tee is to run R code in an isolated session, or arbitrary scripts, and log the output to a file.  It is similar to the `tee` utility, but relies on [*callr*](https://github.com/r-lib/callr) and [*processx*](https://github.com/r-lib/processx). All systems where these packages work (including Windows) are supported.\n\nWorks for me.\n\n\n## Installation\n\nYou can install *tee* from GitHub:\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_local(\"krlmlr/tee\")\n```\n\n## Example\n\nThe `r_tee()` function has (almost) the same signature as `callr::r()` but supports a `tee` argument of type `character`. If set, all output will be written to the file(s) specified in the `tee` argument. Missing directories are created automatically.\n\n```{r example}\nlibrary(tee)\nret \u003c- r_tee(function() { print(\"Hi!\"); 42 }, tee = \"log/hi.log\")\nret\nreadLines(\"log/hi.log\")\n```\n\n```{r cleanup, include = FALSE}\nunlink(\"log\", recursive = TRUE)\n```\n\nANSI escapes will be stripped automatically from the output via `fansi::strip_sgr()`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlmlr%2Ftee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrlmlr%2Ftee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrlmlr%2Ftee/lists"}