diff --git a/README.md b/README.md index 5a84e39..2675ec2 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/dune-project b/dune-project index 17d2322..a51483b 100644 --- a/dune-project +++ b/dune-project @@ -2,6 +2,8 @@ (name scribe) +(version 0.1.0) + (generate_opam_files true) (source diff --git a/scribe.opam b/scribe.opam index 4c22dbb..7a22d61 100644 --- a/scribe.opam +++ b/scribe.opam @@ -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."