A modern log viewer for Posit Connect
Browse, filter, and search job logs from your Posit Connect server โ all from a beautiful R Shiny interface.
Quick Start ยท Features ยท Project Structure ยท Development
| Feature | Description |
|---|---|
| ๐ Auto-Connect | Connects to Posit Connect on startup via environment variables โ no manual setup inside the app |
| ๐ฆ Content & Job Browser | Lists all deployed content and their associated jobs in a searchable sidebar |
| ๐ท๏ธ Log Classification | Automatically classifies every line into ERROR, WARN, INFO, DEBUG, TRACE, STDOUT, or STDERR |
| ๐๏ธ Interactive Filters | Toggle log levels on/off with colour-coded filter chips |
| ๐ Full-Text Search | Instantly search across all log messages with a free-text input |
| ๐ Summary Counters | At-a-glance severity breakdown with colour-coded count badges |
| ๐ Dark / Light Theme | One-click toggle with preference saved to localStorage |
| ๐ Paginated Table | High-performance reactable table with customisable page sizes (50 / 100 / 250 / 500) |
- Rhino โ enterprise-grade R Shiny framework
- bslib (Bootstrap 5) โ theming and layout
- reactable โ interactive data tables
- connectapi โ Posit Connect API client
- Sass (via Node) โ premium design system with CSS custom properties
- Cypress โ end-to-end testing
- GitHub Actions โ CI pipeline for linting, building, and testing
| Dependency | Version |
|---|---|
| R | โฅ 4.1 |
| renv | (bundled) |
| Node.js | โฅ 20 |
| npm | โฅ 9 |
You also need a running Posit Connect server and a valid API key.
git clone <your-repo-url> LogLens
cd LogLens
Rscript -e "renv::restore()"cd .rhino
npm ci
cd ..Create a .Renviron file in the project root (it's git-ignored):
CONNECT_SERVER=https://your-connect-server.example.com
CONNECT_API_KEY=your-api-keyRscript -e "rhino::build_js(); rhino::build_sass()"Rscript -e "rhino::app()"The app will open in your browser. Select a content item and job from the sidebar, then click Fetch Logs.
LogLens/
โโโ app/
โ โโโ main.R # Root UI & server โ wires sidebar + log viewer
โ โโโ js/
โ โ โโโ index.js # Theme toggle (dark/light with localStorage)
โ โโโ logic/
โ โ โโโ connect_api.R # Posit Connect API wrapper (connectapi)
โ โ โโโ log_parser.R # Log parsing & severity classification
โ โโโ styles/
โ โ โโโ main.scss # Full design system (light + dark themes)
โ โโโ static/ # Static assets
โ โโโ view/
โ โโโ sidebar.R # Content/job selectors, connection status
โ โโโ log_viewer.R # Filters, search, summary boxes, log table
โโโ tests/
โ โโโ testthat/ # R unit tests
โ โโโ cypress/ # End-to-end tests
โโโ .github/
โ โโโ workflows/
โ โโโ rhino-test.yml # CI: lint โ build โ test
โโโ config.yml # Rhino app configuration
โโโ dependencies.R # Explicit package declarations for deployment
โโโ renv.lock # Reproducible R dependency lockfile
โโโ rhino.yml # Rhino framework config (sass: node)
โโโ app.R # Entry point (calls rhino::app())
Start the app on port 3333 (used by Cypress):
cd .rhino && npm run run-app# All linters
Rscript -e "rhino::lint_r(); rhino::lint_js(); rhino::lint_sass()"Rscript -e "rhino::test_r()"cd .rhino && npm run test-e2eThe GitHub Actions workflow (.github/workflows/rhino-test.yml) runs automatically on pushes to main and on pull requests:
- Lint โ R, JavaScript, and Sass
- Build โ JavaScript and Sass compilation
- Test โ R unit tests + Cypress E2E
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Sidebar โ โ Log Viewer โ โ
โ โ โ โ โ โ
โ โ โข Content โ โ โข Summary counters โ โ
โ โ picker โ โ โข Level filter chips โ โ
โ โ โข Job โ โ โข Free-text search โ โ
โ โ picker โ โ โข Paginated log table โ โ
โ โ โข Fetch โ โ โ โ
โ โโโโโโโฌโโโโโโโ โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโ
โ Server (R) โ
โ โ
โ connect_api.R log_parser โ
โ โ โ โ
โโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโ
โ โ
โโโโโโโโโผโโโโโโโ Parse & classify
โ Posit Connectโ severity levels
โ REST API โ
โโโโโโโโโโโโโโโโ
| Variable | Required | Description |
|---|---|---|
CONNECT_SERVER |
โ | Full URL of your Posit Connect server |
CONNECT_API_KEY |
โ | API key with permissions to read content and logs |
RHINO_LOG_LEVEL |
โ | App-level logging threshold (default: INFO) |
RHINO_LOG_FILE |
โ | Path to write app logs to a file (default: console only) |
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes and ensure linters + tests pass
- Commit (
git commit -m "feat: add my feature") - Push to your branch and open a Pull Request