https://github.com/kevinykuo/slate
https://github.com/kevinykuo/slate
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kevinykuo/slate
- Owner: kevinykuo
- License: other
- Created: 2021-01-24T18:33:57.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-22T21:29:10.000Z (almost 4 years ago)
- Last Synced: 2025-04-09T15:16:22.857Z (5 days ago)
- Language: R
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - kevinykuo/slate - (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# slate
A logging library that utilizes Redis as the backend.
## Installation
And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("kevinykuo/slate")
```
## ExampleIn this example, suppose that there is a Redis server running on socket `/tmp/redis.sock`.
We can instantiate a `slate` object using `slate()`:```{r example}
library(slate)
sl <- slate(path = "/tmp/redis.sock", default_app_id = "my_app")
``````{r include=FALSE}
sl$rc$FLUSHALL()
```We can then `etch()` the slate as follows:
```{r cars}
etch_info(sl, "This is an INFO")
etch_warn(sl, "This is a WARN", app_id = "some_other_app")
etch_error(sl, "This is an ERROR", some_field = "some_value")
```We can inspect the slate using the `peruse()` function:
```{r}
peruse(sl)
```For real time monitoring, the `gaze()` function prints new entries to the console
as they arrive.