-
Notifications
You must be signed in to change notification settings - Fork 66
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
chore: add logger #525
base: v3
Are you sure you want to change the base?
chore: add logger #525
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope I understood the changes, I'm not familiar with Python so not all comments may be relevant 🙂
algoliasearch/http/transporter.py
Outdated
self._logger = logging.getLogger('algolia') | ||
self._logger.setLevel(logging.DEBUG) | ||
# create file handler which logs even debug messages | ||
fh = logging.FileHandler('debug.log') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this configurable, please? We can still default to debug.log
🙂
self._logger.addHandler(fh) | ||
self._logger.addHandler(ch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to run both? Or do we want the user to configure which one to use?
Describe your change
Adds a logger to give more info about requests and responses