Skip to content

Conversation

@Pradyumn-cloud
Copy link

FIX ISSUE - #548

This solves the issue where manual logging setup/teardown was error-prone and easy to forget for new public functions.

  • Created @with_logging decorator in decorators.py
  • Handles automatic log start/close with proper cleanup
  • Supports conditional logging via conditional_param parameter
  • Supports custom command names and temp folder storage
  • Ensures logging is closed even when exceptions occur
  • Uses finally block for exception safety

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

… This solves the issue where manual logging setup/teardown was

error-prone and easy to forget for new public functions.
@JoeZiminski
Copy link
Member

Hi @Pradyumn-cloud thanks for this! This looks really cool, you've covered all of the possible cases nicely. It will take me until next week to review in full, will get back to you ASAP! Cheers

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.

2 participants