package ocamlog

  1. Overview
  2. Docs
Simple Logger for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

ocamlog-0.2.tar.gz
md5=093992b1204fb4759541a2331808351c
sha512=e55521d9eec0204f88f6c811f57d112f67f5d001efbb3e7880baaf81a724b8cdf82887465de6b84a91b84e5664c5d47835a4bc889de137e8d692aab0957ad18d

Description

Able to print with different colors, levels, trace out caller, etc.

Published: 29 Nov 2021

README

OcamLog

Logger pour Ocaml.

Usage

Simple

Fichier exemple bin/main.ml:

open Lib

let () = Ocamlog.print Trace "Message 1"

let () = Ocamlog.print Info "Message 2"

let () = Ocamlog.print Warning "Message 3"

let () = Ocamlog.print Error "Message 4"
Preview screen 1

Décorations

Fichier exemple bin/main.ml:

open Lib
let () = Ocamlog.enableDecorations ()

let () = Ocamlog.print Trace "Message 1"
let () = Ocamlog.print Info "Message 2"
let () = Ocamlog.print Warning "Message 3"
let () = Ocamlog.print Error "Message 4"

let () = Ocamlog.disableDecorations ()
Preview screen 2

Inspiration

Merci grand maître Émilien pour cette super idée : CppLogger2

Dependencies (2)

  1. dune >= "2.8"
  2. ocaml >= "4.04"

Dev Dependencies

None

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.