Skip to content

v5.0.0

Choose a tag to compare

@Kydoimos97 Kydoimos97 released this 05 Nov 04:31
· 38 commits to release since this release
676fec8

Modularize WrenchCL Logger Architecture

Breaking Changes

  • Moved cLogger from /WrenchCL/cLogger.py/WrenchCL/_Internal/cLogger.py
  • Import path updated: from ._Internal import cLogger in __init__.py

New Architecture

Decomposed monolithic cLogger (756 lines) into focused API modules:

  • BaseLogger: Core logging interface with standard methods (info, debug, error, etc.)
  • ManagedLoggers: Handler lifecycle management (add, adopt, sync, silence)
  • StreamManager: System-level stream control and exception interception
  • InternalAPI: Implementation details isolated from public interface

New Features

  • ProcessingTracker: Postgres-backed job tracking with TTL cleanup
  • Enhanced Stream Control:
    • Exception hook installation (sys.excepthook, threading.excepthook)
    • Configurable stdout/stderr suppression
  • Handler Ownership System: Distinguish between WrenchCL-owned vs user-attached handlers

Improvements

  • Thread Safety: Proper scoping for handler updates (owned vs all)
  • Formatter Management: Better separation between instance and global formatters
  • Error Handling: Consistent internal logging (_internal.log_internal)
  • Code Quality: Removed redundant docstring parameters, improved DRY compliance

Migration Impact

  • Core API remains backward compatible
  • Internal method calls updated throughout codebase
  • New capabilities available via logger.managed.* and logger.streams.*