Skip to content

Releases: lukstafi/ppx_minidebug

Initial log level

18 Oct 20:34
Compare
Choose a tag to compare

In this release, creating a debug runtime always sets its log level to an initial value (default 9). If the initial log level = 0, the header BEGIN DEBUG SESSION is not logged. Opening (creating) a debug file is postponed so that no file is created if the log level starts and remains at 0.

Values first mode by default; bug fixes

09 Sep 07:14
Compare
Choose a tag to compare

This release makes ~values_first_mode:true the default.
This release fixes logging time tags from other domains -- removes the use of str_formatter which by design only works with the main domain.
Another fix: for the error lexical scope of close_log not matching its dynamic scope, we properly snapshot the logs.

Linear verbosity log levels

26 Aug 19:50
Compare
Choose a tag to compare

This release is mostly about migrating the logging framework to the familiar, linear log levels with verbosity varying from 0 (nothing logged) to 9. It also makes some backward-incompatible simplifications, in particular it gets rid of the _this_ infix. From the CHANGELOG:

Added

  • Compile-time explicit log levels %debug1_sexp, %debug2_sexp, %log1, %log2, %log2_result, %log2_entry etc. that participate in compile-time log level filtering.
  • Runtime log levels %at_log_level, %logN, %logN_result, %logN_printbox that take the level at which to log as argument. Note: not supported for extension entry points %debug_sexp etc.
  • New unregistered extension point %log_block (similar to %log_entry) that assumes its body is logging code only, and does both compile-time and runtime pruning of the body according to the log level. Limited to unit-type bodies.

Changed

  • Moved no_debug_if to the generic interface (the last remaining non-config functionality missing from it). It's ignored (no-op) for the flushing backend.
  • Moved to linear log levels per-entry and per-log, where an unspecified log level inherits from the entry it's in, determined statically.
  • Removed _this_ infix and made all extension points behave as _this_ (not extend to bodies of toplevel bindings).
  • Removed _rtb_ and _lb_ -- all debugging should use the generic interface as it now offers all the functionality except configuration.
  • Removed a heuristic to not print extra debug information at log level 1 -- replaced by checking for %diagn.

Bug-fix release (log levels consistency check)

21 Aug 14:05
Compare
Choose a tag to compare

From the changelog:

Fixed

  • Write the log tree on the error "lexical scope of close_log not matching its dynamic scope", so the entries from the error message can be looked up.
  • Uncaught exception in the [%%global_debug_log_level_from_env_var "..."] consistency check when the environment variable is not defined.

Local debug runtimes; compile-time vs. runtime log levels check

08 Aug 09:46
Compare
Choose a tag to compare

A new family of entry points _l_ resp. _lb_ that retrieve debug runtimes via a call _get_local_debug_runtime () resp. _get_local_printbox_debug_runtime (): these functions are correspondingly expected in the scope. The entry points facilitate using thread-local (and domain-local) debug runtimes.

Compile-time vs. runtime consistency check for %%global_debug_log_level_from_env_var, and %%global_debug_log_level_from_env_var_unsafe that bypasses the check.

Does not try to debug module bindings

07 Jul 17:47
Compare
Choose a tag to compare

A very minor release addressing a pain point: module arguments often require type annotations, but cannot be logged by the sexp derivers.

Flame graphs, and explicit log subtrees with `%log_entry`

20 Mar 20:53
Compare
Choose a tag to compare

This release brings:

  • the [%log_entry] (unregistered) extension point for explicitly creating log subtrees without source location information,
  • flame graphs in Table of Contents files,
  • more flexible configuration of entries to include in a ToC, in particular setting minimal time duration (span).

Log entry anchors and _Table of Contents_

08 Mar 15:59
Compare
Choose a tag to compare

This release:

  • creates anchors for log entries, hyperlinked via ~print_entry_ids:true output,
  • implements a Table of Contents functionality (as hyperlinks to log entry anchors),
  • helps debugging lexical-vs-dynamic scope mismatches for log entries,
  • cleans up the PPX-facing API and adds flexibility with a location_format argument.

Many improvements to the "logging framework" use-case

28 Feb 12:21
Compare
Choose a tag to compare

Many improvements, see CHANGELOG.md for details. Highlights:

  • A new registered extension point prefix %diagn_ that restricts the log level to explicit logs.
  • Periodic snapshotting of un-closed log trees.
  • Make your logs nicer with %log_result (to be paired with values_first_mode) and %log_printbox.
  • Breaking: getting rid of Pp_format.

P.S. While waiting for a bug fix PrintBox 0.10.1 release and then ppx_minidebug 1.3.1, you can apply the fix to line breaks in the HTML output by installing printbox from sources.

Allow logs escaping all lexical debugging scopes

15 Feb 22:26
Compare
Choose a tag to compare
  • Logs escaping all scopes are called "orphaned", and printed with the entry_id of where they come from.
  • An option print_entry_ids to print entry ids together with (after) code paths.