logs-ppx

PPX to cut down on boilerplate when using Logs
README

A simple ppx to remove some boilerplate when using the excelent Logs library.

Usage

Add this to your dune stanza for your executable

(preprocess
  (pps logs-ppx))

Then you use it like this in OCaml:

[%log debug "Hello %s!" "world"]
(* Which genrates the following *)
Logs.debug (fun m -> m "Hello %s!" "world")

And in Reason it looks like this:

[%log debug("Hello %s!", "world")];
// Which generates the following
Logs.debug(m => m("Hello %s!", "world"));

Thanks

A huge thanks goes to @davesnx for a lot of help and his starter repo

Install
Published
08 Dec 2020
Sources
logs-ppx-v0.1.0.tbz
sha256=f379990778301d9d1d1e8b3f8a5f6b8d7361147d89034b0c6a42dabb0a33d425
sha512=500bbbc91f588850376e8a337664702c0d12d06152d1b193bdc24c86ac0a28a7013dc50697eafe7ad7aa4e9942f96b6279bf17d8da0c0b81a4fe53fd0ebf507d
Dependencies
reason
with-test & >= "3.0.0" & < "4.0.0"
ocaml-migrate-parsetree
with-test & >= "1.7.3" & < "2.0.0"
logs
with-test
dune
>= "2.6"
ocaml
>= "4.08.0"
Reverse Dependencies