https://github.com/karimelghazouly/shinylogs_modified
https://github.com/karimelghazouly/shinylogs_modified
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/karimelghazouly/shinylogs_modified
- Owner: karimelghazouly
- Created: 2021-01-08T19:41:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-08T19:44:03.000Z (over 4 years ago)
- Last Synced: 2024-08-13T07:13:54.979Z (8 months ago)
- Language: R
- Size: 223 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - karimelghazouly/shinylogs_modified - (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# shinylogs
> Logging tool for Shiny applications: record inputs or outputs changes, and infos about user's session. All recording is done client-side to not slow down the application and occupy the server.
[](https://CRAN.R-project.org/package=shinylogs)
[](https://cranchecks.info/pkgs/shinylogs)
[](https://www.tidyverse.org/lifecycle/#stable)
[](https://www.repostatus.org/#active)
[](https://codecov.io/gh/dreamRs/shinylogs?branch=master)
[](https://travis-ci.org/dreamRs/shinylogs)
[](https://github.com/dreamRs/shinylogs/actions)## Installation
You can install the released version of shinylogs from [CRAN](https://CRAN.R-project.org) with:
```r
install.packages("shinylogs")
```And the development version from [GitHub](https://github.com/) with:
```r
# install.packages("devtools")
devtools::install_github("dreamRs/shinylogs")
```## Usage
Call the main function `track_usage` in server part of application, and specify where to write logs:
```{r example, eval=FALSE}
library(shinylogs)track_usage(storage_mode = store_json(path = "logs/"))
```The function will record :
* *inputs* : each time an input change, name, timestamp and value will be saved
* *errors* : errors propagated through outputs
* *outputs* : each time an output is re-generated
* *session* : informations about user's browser and the applicationSee the vignette for more details (` ?vignette("shinylogs")`) or the [online version](https://dreamrs.github.io/shinylogs/articles/shinylogs.html).
## Examples
Some example of what is recorded with logs from applications available on our Shiny-Server: http://shinyapps.dreamrs.fr/
Number of connections per applications:
```{r, echo=FALSE}
knitr::include_graphics("man/figures/connections-apps.png")
```Number of connections over time :
```{r, echo=FALSE}
knitr::include_graphics("man/figures/connections-day.png")
```Which tabs (from sidebar in {shinydashboard}) in [shinyWidgets](https://github.com/dreamRs/shinyWidgets) gallery are the most seen :
```{r, echo=FALSE}
knitr::include_graphics("man/figures/shinyWidgets-tabs.png")
```User-agent is recorded per connection and can be parsed with [uaparserjs](https://github.com/hrbrmstr/uaparserjs) :
(unique users are not registered as we use the open source version of shiny-server)```{r, echo=FALSE}
knitr::include_graphics("man/figures/ua-family.png")
knitr::include_graphics("man/figures/ua-os.png")
```