Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextjournal/lurk
A log dashboard tool powered by Clerk and Lucene
https://github.com/nextjournal/lurk
Last synced: 3 months ago
JSON representation
A log dashboard tool powered by Clerk and Lucene
- Host: GitHub
- URL: https://github.com/nextjournal/lurk
- Owner: nextjournal
- License: isc
- Created: 2022-11-17T14:51:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-02-09T10:09:17.000Z (over 1 year ago)
- Last Synced: 2024-01-20T19:13:56.465Z (5 months ago)
- Language: Clojure
- Size: 162 KB
- Stars: 30
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-clerk - Lurk: A log dashboard tool powered by Clerk and Lucene, via lucene-clj
README
# lurk
A log dashboard tool powered by [Clerk](https://github.com/nextjournal/clerk) and [Lucene](https://lucene.apache.org/), via [lucene-clj](https://github.com/jaju/lucene-clj).
![Lurk Screenshot](screenshot.png)
[Video demo from reClojure 2022](https://youtu.be/3bs3QX92kYA?t=289)
## 🚦 Status
A proof-of-concept ALPHA
## 👩🎨 Using Lurk
### startup
start a repl via something like
```bash
clj -Adev -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.29.0"} }}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
```open [`src/nextjournal/lurk.clj`](https://github.com/nextjournal/lurk/blob/main/src/nextjournal/lurk.clj), run `(nextjournal.clerk/show!)`, and navigate to [http://localhost:6677/](http://localhost:6677/)
this will create an in-memory lucene index over the contents of [`example_service/json-logs/example-service.log`](https://github.com/nextjournal/lurk/blob/main/example_service/json-logs/example-service.log) and display a dashboard. Any new addtions to that `example-service.log` will get indexed and shown.
### generating example logs
In the `example_service` directory there is a simple service that loops forever and generates json-formatted logs. To start this process:
```bash
cd example_service
clj -Xrun
```This begins writing json logs to `example_service/json-logs/example-service.log`
### log queries
Querying can be done using [lucene-clj query language](https://github.com/jaju/lucene-clj#search-variations)
```
{:level "WARN"}
```or
```
{:level "WARN" :message #{"abulafia" "Belbo"}}
```