ppx_log

Ppx_sexp_message-like extension nodes for lazily rendering log messages
README

A ppx rewriter that defines extension nodes for logging: primarily useful
to avoid the allocation of sexps that will never be logged.

[%log.debug log "example log" (content : Content.t)]
[%log.global.debug "example log" (content : Content.t)]

How to add to your project

First, add ppx_log to your jbuild:

(preprocess (pps (ppx_jane ... ppx_log)))

If you have an import.ml file, then add include Ppx_log_async to use ppx_log
with Async.Log. Otherwise, you can simply open Ppx_log_async in the files that you
want to log.

Finally [%log.debug] to your heart's content!

Tests and examples

Take a look at the mdx file for tested examples.

Install
Published
31 May 2020
Sources
ppx_log-v0.14.0.tar.gz
md5=0f85a9703c8265262a21e5010a5dcdd2
Dependencies
ppxlib
>= "0.11.0"
dune
>= "2.0.0"
sexplib
>= "v0.14" & < "v0.15"
ppx_sexp_message
>= "v0.14" & < "v0.15"
ppx_sexp_conv
>= "v0.14" & < "v0.15"
ppx_jane
>= "v0.14" & < "v0.15"
core
>= "v0.14" & < "v0.15"
async_unix
>= "v0.14" & < "v0.15"
ocaml
>= "4.04.2"
Reverse Dependencies