Skip to content

Adding Log Propagate #503

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

Merged
merged 29 commits into from
May 4, 2025
Merged

Adding Log Propagate #503

merged 29 commits into from
May 4, 2025

Conversation

devsetgo
Copy link
Owner

@devsetgo devsetgo commented May 4, 2025

Pull Request Description: Adding Log Propagate

Motivation

This pull request introduces the Log Propagate feature to our project, which enhances our logging capabilities. By integrating log propagation, we ensure that log messages are consistently passed through different layers of our application. This improvement is crucial for debugging and tracking the flow of execution across various modules, thereby increasing the maintainability and observability of our codebase.

Changes Made

  1. Updated Devcontainer Configuration:

    • Removed specific extensions and added the necessary configurations to support logging enhancements.
  2. Docker Compose Configuration:

    • Added comments to improve clarity and maintainability of the configuration.
  3. Changelog Updates:

    • Documented the changes in the CHANGELOG.md file to keep track of the new feature and its benefits.
  4. Coverage Badge Update:

    • Updated the coverage badge to reflect improved test coverage due to the new logging features.
  5. Code Adjustments:

    • Minor adjustments in various files to ensure that logging is correctly implemented and that log messages are properly formatted and propagated.

Benefits

  • Improved Debugging: Developers can trace log messages across different components, making it easier to diagnose issues.
  • Enhanced Observability: The application will have better insights into its operations, which is vital for monitoring and performance tuning.
  • Consistency: Ensures that logging behavior is uniform across the application, reducing the chances of missing important log messages.

This change is a step towards a more robust architecture, ultimately leading to a more reliable and maintainable codebase.

devsetgo added 20 commits April 17, 2025 20:12
- Added the log_propagate parameter to the config_log function, allowing users to control whether log messages propagate to ancestor loggers.
- Updated the module and function docstrings to document the new log_propagate option and its default value (False).
- Modified the logging configuration logic to set the propagate attribute on all managed loggers according to the log_propagate argument, helping prevent duplicate log lines when intercepting standard logging.
- Updated usage examples in the documentation to include log_propagate.
- Ensured all unit tests and test calls to config_log explicitly pass the log_propagate argument for clarity and coverage.
- This change improves flexibility and prevents duplicate log entries when integrating loguru with standard Python logging.
…pt execution from module and coverage; note that the same example usage code is available in examples/validate_email.py
@devsetgo devsetgo added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels May 4, 2025
Copy link

sonarqubecloud bot commented May 4, 2025

@devsetgo devsetgo merged commit d445e98 into main May 4, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant