Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,33 @@

`scribe` is a small structured logging library for OCaml. A logger is an ordinary value that carries its level, sink, and context fields, so application code can compose loggers and library code can accept `?logger` without touching process-wide logging state.

## Quick Start
## Installation

Use the core logger with the JSON adapter:
`scribe` is distributed through Git tags; pin it with opam.

Pin the latest release:

```sh
LATEST=$(git ls-remote --tags --refs --sort=-v:refname https://github.com/sambyeol/scribe.git | head -n1 | sed 's|.*/||')
opam pin add scribe "https://github.com/sambyeol/scribe.git#$LATEST"
```

Or pin a specific version:

```sh
opam pin add scribe "https://github.com/sambyeol/scribe.git#v0.1.0"
```

Then depend on the libraries from your dune file:

```lisp
```
(libraries scribe scribe.sinks)
```

## Quick Start

Use the core logger with the JSON adapter:

```ocaml
let logger =
Scribe.create
Expand Down
2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

(name scribe)

(version 0.1.0)

(generate_opam_files true)

(source
Expand Down
1 change: 1 addition & 0 deletions scribe.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.1.0"
synopsis: "Value-based structured logging for OCaml"
description:
"Scribe is a small structured logging library whose logger values carry their level, sink, and context."
Expand Down