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
- Authors
-
- Maintainers
-
Sources
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