v4.4.0
WrenchCL Release Notes – v4.4.0
Enhancements
-
Logger Configuration
-
LoggerConfigState.should_format_messagenow respects deployment state:- Automatically disables formatting when
deployed=True. - Adds
suppress_autoconfigoption to override automatic adjustments.
- Automatically disables formatting when
-
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.
- JSON mode implies deployment unless
-
should_suggest_exceptionsnow always returnsTrueto ensure exception suggestions are consistently available. -
Property renames for clarity and consistency:
logger_state→statelogger_instance→instanceattached_loggers→loggers
-
-
Global Logger Manager
- Annotated with
@SingletonClassfor enforced global singleton behavior.
- Annotated with
-
Formatter Improvements
-
dd.trace_idanddd.span_idnow default to0if unset, preventing KeyError issues. -
__pretty_logimprovements:- Added
cwidthoption for compact formatting width control (default: 240). - More consistent handling of dicts, JSON-like strings, and
pandas.DataFrame. - Output automatically stripped of trailing whitespace.
- Added
-
-
Imports & Portability
- Replaced absolute imports (
WrenchCL.logger,_MockPandas) with relative imports across modules for better package portability. - Updated
ExceptionSuggestorandRetryableto use relative imports.
- Replaced absolute 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_autoconfigallows controlled overrides in CI and deployment scenarios.
- Validate new property names (
-
Enhanced test coverage for logger configuration transitions and metadata persistence.
Migration Notes
-
Replace old property names in client code:
logger.logger_state→logger.statelogger.logger_instance→logger.instancelogger.attached_loggers→logger.loggers
-
If relying on implicit JSON/deployment behavior, verify whether
suppress_autoconfigis needed in your environment.