package ppx_log

Not available on OCaml 5.5
  1. Overview
  2. Docs
Ppx_sexp_message-like extension nodes for lazily rendering log messages

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ppx_log-v0.15.0.tar.gz
sha256=037aa3c8c4dca5c7ce9154e981c146c92faeeac456931cf3c9496b4f9698763e

Description

Part of the Jane Street's PPX rewriters collection.

Added to opam-repository:

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

You can simply open Async in the files that you want to log with Async.Log. Additionally, open Async.Ppx_log_syntax.No_global will prevent you from using Log.Global if you want to avoid the global log.

ppx_log can add source code position to each logged message, configurable at a library level by the -log-source-position switch:

(preprocess (pps (ppx_jane ... -log-source-position)))

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

Tests and examples

Take a look at the mdx file for tested examples.

Dependencies (8)

  1. ppxlib >= "0.23.0"
  2. dune >= "2.0.0"
  3. sexplib >= "v0.15" & < "v0.16"
  4. ppx_sexp_message >= "v0.15" & < "v0.16"
  5. ppx_sexp_conv >= "v0.15" & < "v0.16"
  6. ppx_here >= "v0.15" & < "v0.16"
  7. base >= "v0.15" & < "v0.16"
  8. ocaml >= "4.08.0"

Dev Dependencies

None

Optional Dependencies

None

Used by (2)

  1. async = "v0.15.0"
  2. ppx_jane = "v0.15.0"

Conflicts

None

Build status

Results of building ppx_log with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
v0.17.0 n/a n/a good good good
v0.16.0 n/a good good n/a n/a
v0.15.0 (this version) good good good n/a n/a
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure