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

Prompt Driver Debug Logs #1250

Merged
merged 11 commits into from
Oct 10, 2024
Merged

Prompt Driver Debug Logs #1250

merged 11 commits into from
Oct 10, 2024

Conversation

collindutter
Copy link
Member

@collindutter collindutter commented Oct 9, 2024

Describe your changes

Added

  • LoggingConfig.handlers for configuring logging handlers.
  • LoggingConfig.handlers_formatter for configuring a formatter for all handlers.
  • LoggingConfig.propagate for configuring whether log messages should be propagated to parent loggers.
  • LoggingConfig.level for configuring the logging level.
  • griptape.configs.logging.JsonFormatter for formatting logs as JSON.
  • Request/response debug logging to all Prompt Drivers.

Changed

  • _DefaultsConfig.logging_config and Defaults.drivers_config are now lazily instantiated.

Issue ticket number and link

Closes #267

@collindutter collindutter changed the title Feature/debug logs Prompt Driver Debug Logs Oct 9, 2024
@collindutter collindutter requested a review from vachillo October 9, 2024 22:47
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 99.09910% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
griptape/configs/logging/json_formatter.py 92.30% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

kyleroche
kyleroche previously approved these changes Oct 10, 2024
Copy link
Member

@kyleroche kyleroche left a comment

Choose a reason for hiding this comment

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

tested. works great.

Comment on lines +12 to +13
def __attrs_pre_init__(self) -> None:
super().__init__()
Copy link
Member

Choose a reason for hiding this comment

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

does this need to get set on the filters too?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, I just ran into errors without it.

@collindutter collindutter merged commit 3fc39a4 into dev Oct 10, 2024
15 checks passed
@collindutter collindutter deleted the feature/debug-logs branch October 10, 2024 16:55
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.

Add More Useful Logs
3 participants