Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Comprehensive Logging System to ABCParse #11

Merged
merged 15 commits into from
Feb 28, 2025
Merged

Add Comprehensive Logging System to ABCParse #11

merged 15 commits into from
Feb 28, 2025

Conversation

mvinyard
Copy link
Owner

Overview

This PR introduces a robust logging system to ABCParse, providing users with flexible and configurable logging capabilities. The new logging module enables better visibility into the parsing process and allows for customized logging configurations.

Key Changes

New Features

  • Centralized Logging System: Added ABCLogger class that provides a consistent logging interface across the package
  • Configurable Log Levels: Support for standard log levels (debug, info, warning, error, critical)
  • File Logging: Option to log messages to both console and file simultaneously
  • Convenience Functions: Global logging functions for quick access without creating logger instances
  • Dictionary Logging: Special method to log dictionary data in a structured format

Implementation Details

  • Created a modular logging system with separate files for different functionalities
  • Added comprehensive unit tests for all logging features
  • Updated README with usage examples and documentation
  • Integrated logging into the core ABCParse class

Code Structure

  • _abc_logger.py: Core logger implementation with robust error handling
  • _get_logger.py: Factory function for creating logger instances
  • _convenience_functions.py: Global logging functions (debug, info, etc.)
  • _set_global_log_level.py: Function to control global logging level
  • _format.py: Default formatting constants

Other Improvements

  • Updated setup.py with better metadata and Python version compatibility
  • Added development dependencies for testing
  • Enhanced test coverage for both logging and core functionality

Testing

The PR includes extensive unit tests that verify:

  • Basic logging functionality
  • File logging capabilities
  • Integration with ABCParse class
  • Error handling and resource management

This logging system provides ABCParse users with better visibility into their code's behavior and enhances the overall developer experience.

@mvinyard mvinyard self-assigned this Feb 28, 2025
@mvinyard mvinyard merged commit 504cce2 into main Feb 28, 2025
4 checks passed
@mvinyard mvinyard deleted the dev branch February 28, 2025 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant