An open API service indexing awesome lists of open source software.

https://github.com/kevinykuo/slate


https://github.com/kevinykuo/slate

Last synced: 5 days ago
JSON representation

Awesome Lists containing this project

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")
```
## Example

In 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.