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

Added function to allow dynamic logging configuration using a provided dictionary. #82

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

RINO-GAELICO
Copy link
Contributor

Description

Added a configure_logging function that allows users to set up logging configurations dynamically. This function can accept a configuration dictionary, enabling users to adjust log levels, formats, and handlers. If no configuration is provided, it defaults to a basic logging setup with INFO level logging.

Related Issue

#32

Changes Made

  • Implemented the configure_logging function in the relevant module.
  • Added documentation for the function, including parameter descriptions and usage examples.
  • Updated the logging initialization to use the new configuration function, enhancing logging flexibility.

Testing

I didn't add a test since a test for start_sandbox function is still missing.

Checklist

  • I have read the contributing guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

Copy link
Contributor

@adamkells adamkells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @RINO-GAELICO , this looks great! I think it would just be a bit neater if we move the logging code to be inside the start_sandbox function and pass the logging_config directly in there rather than having a separate function for it.

@RINO-GAELICO
Copy link
Contributor Author

@adamkells thanks for the feedback. Here is the updated code. Please let me know if everything looks ok

Copy link
Contributor

@adamkells adamkells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Will merge shortly

@adamkells adamkells merged commit 4923203 into dotimplement:main Oct 15, 2024
5 checks passed
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.

3 participants