Skip to content

Releases: DMsuDev/logguard

v0.3.2 Clean Tracebacks

21 Mar 00:36

Choose a tag to compare

Assertion failures now produce minimal, user-friendly tracebacks by removing internal frames. New CI/CD workflows automate publishing to PyPI.

Improvements

  • Clean assertion tracebacks: _handle() now returns the exception instead of raising it internally. Public functions (CHECK, ASSERT, ENSURE, VERIFY, and all ASSERT_* helpers) raise the exception directly, keeping _handle, _build_failure, and _default_raise_strategy out of the user-visible traceback.
  • New _build_failure() method: Delegates exception creation to the configured raise strategy and clears __traceback__ for clean error output. Custom strategies via set_failure_strategy() continue to work unchanged.

v0.3.1 New handler selector

21 Mar 00:32

Choose a tag to compare

Release v0.3.1

Handler System Overhaul

New handler API with runtime format changes and a dedicated enum to replace magic strings.

Features

  • HandlerType enum: ALL, CONSOLE, FILE, JSON. Maintains backward compatibility with strings.
  • _find_handlers: centralizes handler lookup for set_level and set_format.
  • set_format: update handler format at runtime; RichHandler and JsonFormatter are skipped with warnings.

Improvements

  • set_level now supports HandlerType members and strings.
  • Unified type signatures for handler operations.

Documentation

  • Updated module and class docstrings with examples.
  • README updated with HandlerType and set_format references.
  • GitHub Actions workflows:docs.yml (pdoc deploy to Pages). CI uploads coverage to Codecov.

Testing

  • test_find_handlers_types, test_set_level, and test_set_format_* cover all branches.
  • test_rich_library_missing covers the ImportError fallback for Rich.

v0.3.0

17 Feb 19:17

Choose a tag to compare

Release v0.3.0

🎯 Major Update - Enhanced Assertions & Documentation

py-logguard features a completely revamped assertion system, improved exception hierarchy, and comprehensive documentation updates.

✨ Features

  • Revamped Assertion System: Complete overhaul with enhanced documentation and flexible failure handling in development and production environments
  • New Assertion Exceptions: Added specialized exceptions for assert operations with improved error handling
  • Demo Script: Added comprehensive demo script showcasing LogGuard capabilities
  • Makefile Enhancement: New lint-fix target for automatic code fixing with Ruff

Note: This release includes breaking changes to the assertion system. Please review the updated documentation for migration details.

🐛 Bug Fixes

  • Fixed issues with assertion error handling, now properly raising exceptions instead of logging errors in production environments
  • Fixed get_logger function to ensure correct logger retrieval and configuration:
    • Before: get_logger always created a new logger instance, leading to potential issues with multiple loggers and inconsistent logging, requiring set force=True to override existing loggers

🔄 Refactoring

  • Exception Hierarchy: Migrated from AppBaseError to LogGuardError as the base exception class for better naming consistency
  • AppLogger Enhancement: Improved logging configuration logic and documentation
  • Handler Management: Better AppLogger setup and improved handler management
  • Lazy Loading: Optimized imports and lazy loading for better performance
  • Repository Cleanup: Removed outdated example scripts to streamline repository structure

📚 Documentation

  • Package Documentation: Updated for clarity and improved structure
  • README Updates: Comprehensive README update highlighting new features and capabilities
  • Enhanced Docstrings: Improved documentation across all modules

🧪 Testing

  • Updated Tests: New comprehensive tests for version 0.3.0 features
  • Assertion Tests: Enhanced test coverage for the new assertion system

v0.2.0

15 Feb 01:13

Choose a tag to compare

Release v0.2.0

🚀 Beta Release

py-logguard with significant refactoring, modern Python syntax, and enhanced security workflows.

✨ Features

  • Security Scanning: Added CodeQL analysis workflow for automated security scanning
  • Spell Checking: Integrated Codespell workflow to catch spelling errors
  • Enhanced CI/CD: Improved quality checks and testing workflow with better coverage
  • Pre-commit Hooks: Added pre-commit hooks configuration for automated linting and type checking

🔄 Refactoring

  • Modern Type Hints: Updated type hints to use Python 3.10+ syntax
  • Exception System: Improved exception display by consolidating message and context handling
  • Code Cleanup: Removed unused error classes and simplified codebase
  • Authentication Updates: Replaced AuthenticationError with ForbiddenError
  • Assertion Helpers: Simplified type hints in assertion helper functions
  • Logging Warnings: Cleaned up logging warnings throughout the codebase

📚 Documentation

  • Updated README with latest features and improvements
  • Updated pre-commit exclusions for better workflow

⚙️ Configuration

  • Python Requirements: Updated to Python 3.10+ requirements
  • Development Status: Upgraded to Beta status
  • Linter Configuration: Updated linter configurations in pyproject.toml

🧪 Testing

  • Updated comprehensive tests for logguard package initialization
  • Enhanced logger functionality tests

🗑️ Cleanup

  • Removed validation workflow from GitHub Actions
  • Temporarily removed deploy documentation workflow

v0.1.1

14 Feb 00:26

Choose a tag to compare

v0.1.1 Pre-release
Pre-release

Release v0.1.1

Initial Release

First release of py-logguard - A comprehensive Python logging and assertion library with rich formatting capabilities.

Features

  • Core Logging System: Introduced AppLogger with flexible configuration and multiple handler support
  • Rich Exception Formatting: Added rich exceptions demo showcasing enhanced error display with context
  • Assertion Helpers: Implemented assertion utilities for type checking and validation (replaced FatalAssertionError with ValidationError)
  • JSON Logging Support: Added optional JSON logging capabilities with python-json-logger
  • CI/CD Workflows: Set up GitHub Actions for quality checks and coverage reporting
  • Documentation: Added Makefile for build, test, and documentation management
  • Examples: Included demonstration scripts for AppLogger and ASSERT usage

Development

  • Added cross-platform Makefile for project management
  • Set up comprehensive test suite for exceptions and logger modules