[ANN] ppx_minidebug 2.0: verbosity levels

Hello!

I’m pleased to mention that ppx_minidebug 2.0 is available now. The README at ppx_minidebug - GitHub is the user manual, and the runtime API is documented here: ppx_minidebug.Minidebug_runtime.

Version 2.0 brings linear verbosity log levels. Both logging scopes and individual log statements can be either: at a default (omitted) log level, at a compile-time log level (e.g. [%log2 "test"] logs test at level 2), or at a runtime-provided log level (e.g. [%logN for_level; "test"] logs test at level for_level). When the level to log at is omitted, it is inherited from its direct syntactic logging scope (i.e. the log entry that the log or log entry is syntactically in – not the log entry that the log is dynamically attached to, if it’s different). Providing a compile-time log level will prune the generated code accordingly. See more here: ppx_minidebug: Using as a logging framework.

Version 1.6 brought support for local runtimes, where the runtime for logging in a logging scope is fetched by a user-provided function. The function can for example use domain-local storage. See more here: ppx_minidebug: Dealing with concurrent execution.

Happy debugging!

1 Like