{"id":14067514,"url":"https://github.com/atheriel/rsyslog","last_synced_at":"2025-03-25T10:32:17.729Z","repository":{"id":56934877,"uuid":"138613301","full_name":"atheriel/rsyslog","owner":"atheriel","description":"An R interface to syslog, the POSIX system logger API","archived":false,"fork":false,"pushed_at":"2023-05-08T13:32:12.000Z","size":27,"stargazers_count":26,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T01:06:30.696Z","etag":null,"topics":["logging","posix","r","syslog"],"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/atheriel.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"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}},"created_at":"2018-06-25T15:23:12.000Z","updated_at":"2024-11-20T16:53:30.000Z","dependencies_parsed_at":"2024-02-19T19:15:49.605Z","dependency_job_id":"32f4eb2e-68d1-4551-8ab6-a1b3c67fc88e","html_url":"https://github.com/atheriel/rsyslog","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":"0.12121212121212122","last_synced_commit":"082232911588bb917759b0f828d6836993aeed28"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atheriel%2Frsyslog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atheriel%2Frsyslog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atheriel%2Frsyslog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atheriel%2Frsyslog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atheriel","download_url":"https://codeload.github.com/atheriel/rsyslog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245444241,"owners_count":20616345,"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","posix","r","syslog"],"created_at":"2024-08-13T07:05:38.202Z","updated_at":"2025-03-25T10:32:16.738Z","avatar_url":"https://github.com/atheriel.png","language":"R","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)\nlibrary(rsyslog)\n```\n\n# rsyslog\n\n[![CRAN status](http://www.r-pkg.org/badges/version/rsyslog)](https://cran.r-project.org/package=rsyslog)\n\n**rsyslog** is a very simple R package to interface with [syslog](https://en.wikipedia.org/wiki/Syslog) --\na system logging interface available on all POSIX-compatible operating systems.\n\n## Installation\n\nTo get the latest stable version from CRAN:\n\n```{r, eval = FALSE}\ninstall.packages(\"rsyslog\")\n```\n\nIf you need access to in-development features, you can install the package\ndirectly from GitHub:\n\n```r\n# install.packages(\"devtools\")\ndevtools::install_github(\"atheriel/rsyslog\")\n```\n\n## Usage\n\nUsing **rsyslog** closely resembles using the [syslog\nAPI](https://man7.org/linux/man-pages/man3/openlog.3.html), so it should be\nfamiliar if you have previous experience with syslog.\n\nMessages are sent to the system log with the `syslog()` function. You can also\n(optionally) configure how messages are written with `open_syslog()` and close\nany open connection with `close_syslog()`.\n\n```{r example}\nopen_syslog(\"my_script\")\nsyslog(\"Running script.\", level = \"INFO\")\nsyslog(\"Possible issue.\", level = \"WARNING\")\nclose_syslog()\n```\n\nTo see what this has printed to the system log on `systemd`-based Linux\ndistributions (including Ubuntu), you can use the `journalctl` program:\n\n```shell\n$ journalctl --identifier my_script\n```\n\n    -- Logs begin at Mon 2018-06-25 14:48:12 UTC, end at Mon 2018-06-25 15:35:02 UTC. --\n    Jun 25 15:10:18 user my_script[4467]: Running script.\n    Jun 25 15:10:18 user my_script[4467]: Possible issue.\n\nOpening and closing the system log is not strictly necessary (though it is good\npractice). The following will work as well:\n\n```{r brief-example}\n# Uses the process name (likely \"R\" or \"rsession\") as the identifier.\nsyslog(\"Hello from R!\", level = \"WARNING\")\n```\n\nIf you wish to control the visibility of messages by priority level (for\nexample, to hide debug messages), use `set_syslog_mask()`:\n\n```{r mask-example}\nopen_syslog(\"my_script\")\nsyslog(\"This message is visible.\", level = \"INFO\")\nset_syslog_mask(\"WARNING\")\nsyslog(\"No longer visible.\", level = \"INFO\")\nsyslog(\"Still visible.\", level = \"WARNING\")\nclose_syslog()\n```\n\n## License\n\nThe package is licensed under the GPL, version 2 or later.\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatheriel%2Frsyslog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatheriel%2Frsyslog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatheriel%2Frsyslog/lists"}