Skip to content

Linear verbosity log levels

Compare
Choose a tag to compare
@lukstafi lukstafi released this 26 Aug 19:50
· 16 commits to main since this release

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.