package ppx_log

  1. Overview
  2. Docs
Ppx_sexp_message-like extension nodes for lazily rendering log messages

Install

Dune Dependency

Authors

Maintainers

Sources

ppx_log-v0.14.0.tar.gz
md5=0f85a9703c8265262a21e5010a5dcdd2

Description

Part of the Jane Street's PPX rewriters collection.

Published: 31 May 2020

README

ppx_log

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.

Dependencies (9)

  1. ppxlib >= "0.11.0"
  2. dune >= "2.0.0"
  3. sexplib >= "v0.14" & < "v0.15"
  4. ppx_sexp_message >= "v0.14" & < "v0.15"
  5. ppx_sexp_conv >= "v0.14" & < "v0.15"
  6. ppx_jane >= "v0.14" & < "v0.15"
  7. core >= "v0.14" & < "v0.15"
  8. async_unix >= "v0.14" & < "v0.15"
  9. ocaml >= "4.04.2"

Dev Dependencies

None

Used by

None

Conflicts

None