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

#28: Add session history to ease request debugging #47

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

ajjn
Copy link
Contributor

@ajjn ajjn commented Mar 8, 2020

@ajjn ajjn requested review from divums, mweber-qvantel and a team March 8, 2020 17:37
@coveralls
Copy link

coveralls commented Mar 8, 2020

Coverage Status

Coverage decreased (-0.4%) to 88.048% when pulling 697db9e on session_history into 3c1940e on develop.

README.rst Outdated
enable_history_at_loglevel='WARNING')
# or
import logging
logging.basicConfig(level='DEBUG')
Copy link

@katajakasa katajakasa Mar 8, 2020

Choose a reason for hiding this comment

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

Are you sure it's a good idea to tie the library to a logging library this way ? What if I want to use some other logging library ? Or if I want to debug in production but don't want to leak this data to eg. sentry via sentry-sdk breadcrumbs or data logging ? I think this is something that should instead be explicitly set, so eg. enable_session_log: bool instead of enable_history_at_loglevel.

Choose a reason for hiding this comment

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

Also, it might be a better idea to allow function callback hooks for this. Eg. hook for received data, hook for sent data etc. That would be much more versatile, and also allows for logging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @katajakasa, I guess you are right! The library user can anyway build whatever logic for binding to log level the way they want, so I will just make it a simple boolean enabled. Adding callback hooks is also a good idea. Let's see what can be done...

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