Suricate is a lightweight logging library inspired by Python logging
library written in Ocaml.
cd Suricate
opam install .
open Suricate
let formatter (log : Log.t) =
Printf.sprintf "%s :: %s"
(log.level |> Log_level.to_string)
log.message
module Stream_handler = (val Handler.Stream.create Debug ~formatter)
module Main_logger =
(val Logger.create "main" Debug ~handlers:[ (module Stream_handler) ])
let () = Main_logger.info "program is finished"
dune build examples
dune exec examples/main/main.exe
dune exec examples/custom/custom.exe
dune build @doc
- GPL 3.0 or later. See license for more information.