package nloge

All checked builds pass
  1. Overview
  2. Docs
Non-blocking logger with eio

Install

dune-project
 Dependency

Authors

Maintainers

Sources

nloge-0.0.2.tbz
sha256=3298aed3e46eaf255384285e96091eed9c62892258e37fa3c5c790b211b07ff5
sha512=7a927c23f94824fef3b09783af29b87c5e4de0c2b458a5571f3acbd30afdadaef14ac3fbb33daaa360f9b5a9ffe8162dbe92db319d9a24a678eac514dc9c1aa5

Description

Added to opam-repository:

README

n log e

Nloge, no-blocking logger with eio

Logger emits JSON -{Emit} -> converts JSON to string -{Write}-> "log"s the string

Usage

See hello

let () =
  Eio_main.run
  @@ fun env ->
  Eio.Switch.run
  @@ fun sw ->
  Nloge.run ~sw ~outputs:[ env#stdout ] ~level:`Debug
  @@ fun () ->
  Nloge.debug
    ~__LOC__
    ~metadata:[ "now_posix", `Float (Eio.Time.now env#clock) ]
    (fun m -> m "hello")
;;

By default nloge logs with JSON format:

$ dune exec --display=quiet examples/hello.exe
{"log_level":"DEBUG","message":"hello","label":"File \"examples/hello.ml\", line 9, characters 5-12","now_posix":1683056241.957986}

custom writere

See custom writer

Dependencies (6)

  1. ptime
  2. yojson >= "1.6.0"
  3. ppx_deriving
  4. eio < "0.12"
  5. dune >= "3.7.0"
  6. ocaml >= "5.0"

Dev Dependencies (5)

  1. odig with-doc
  2. odoc with-doc
  3. alcotest with-test
  4. ppx_expect with-test
  5. eio_main with-test

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building nloge with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.0.2 (this version) n/a n/a good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure