simple log to store.
This commit is contained in:
@@ -1,3 +1,26 @@
|
||||
# simple-log
|
||||
|
||||
Extends on racket logging to make it more simple
|
||||
`simple-log` is a small convenience layer on top of Racket's logging system.
|
||||
It provides generated procedures for the standard log levels and supports
|
||||
logging to the display, a file, custom callbacks, and a filterable in-memory
|
||||
store.
|
||||
|
||||
```racket
|
||||
#lang racket
|
||||
|
||||
(require simple-log)
|
||||
|
||||
(sl-def-log example)
|
||||
(define logs (sl-log-to-store 1000))
|
||||
(sl-log-to-display)
|
||||
|
||||
(info-example "Started with ~a items" 3)
|
||||
(warn-example "An example warning")
|
||||
(sync-log-example)
|
||||
|
||||
(sl-store->display
|
||||
(sl-store-grep-level logs 'warning))
|
||||
```
|
||||
|
||||
The Scribble manual documents logger definitions, destinations, log levels,
|
||||
synchronization, and all in-memory store operations.
|
||||
|
||||
Reference in New Issue
Block a user