Skip to content

v4.4.0

Choose a tag to compare

@Kydoimos97 Kydoimos97 released this 22 Sep 21:00
· 69 commits to release since this release
ef36ffd

WrenchCL Release Notes – v4.4.0

Enhancements

  • Logger Configuration

    • LoggerConfigState.should_format_message now respects deployment state:

      • Automatically disables formatting when deployed=True.
      • Adds suppress_autoconfig option to override automatic adjustments.
    • Improved handling of terminal vs. JSON mode:

      • JSON mode implies deployment unless suppress_autoconfig=True.
      • Terminal mode defaults to color-enabled, syntax highlighting, and no forced markup, unless explicitly overridden.
    • should_suggest_exceptions now always returns True to ensure exception suggestions are consistently available.

    • Property renames for clarity and consistency:

      • logger_statestate
      • logger_instanceinstance
      • attached_loggersloggers
  • Global Logger Manager

    • Annotated with @SingletonClass for enforced global singleton behavior.
  • Formatter Improvements

    • dd.trace_id and dd.span_id now default to 0 if unset, preventing KeyError issues.

    • __pretty_log improvements:

      • Added cwidth option for compact formatting width control (default: 240).
      • More consistent handling of dicts, JSON-like strings, and pandas.DataFrame.
      • Output automatically stripped of trailing whitespace.
  • Imports & Portability

    • Replaced absolute imports (WrenchCL.logger, _MockPandas) with relative imports across modules for better package portability.
    • Updated ExceptionSuggestor and Retryable to use relative imports.

Testing & Stability

  • Updated test suite (test_logger.py, test_logger_json_mode.py, test_data_logs.py) to:

    • Validate new property names (state, instance).
    • Ensure JSON mode + deployment logic works as expected.
    • Confirm suppress_autoconfig allows controlled overrides in CI and deployment scenarios.
  • Enhanced test coverage for logger configuration transitions and metadata persistence.


Migration Notes

  • Replace old property names in client code:

    • logger.logger_statelogger.state
    • logger.logger_instancelogger.instance
    • logger.attached_loggerslogger.loggers
  • If relying on implicit JSON/deployment behavior, verify whether suppress_autoconfig is needed in your environment.