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

Integrate standard python logging across the library and applications to ease debugging #42

Open
devraj opened this issue May 27, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@devraj
Copy link
Member

devraj commented May 27, 2024

Is your feature request related to a problem? Please describe.
I should have started on this earlier but better late than never, this request is to integrate logging to ease debugging across the library and application.

While we have unit testing across the SDK which ensures proper operation, there are now use cases where we have programatic and user interfaces e.g SQL and CLI/TUI.

In cases where we are building an adapter for shillelagh we comes across the need to enable logging as the interactive shell hides all error messages.

import logging
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s')

Describe the solution you'd like
Where possible add logging.DEBUG messages so when the developer/user is running the library with verbose logging enabled they can see what is going on under the hood.

There are various lifecycle use cases where the order of operation matters, for example the _discover method should only be called one the environment variables with the API key is available to the environment.

Other examples are __config__ for endpoints are automatically populated upon the discovery running, and we need to validate that this has happened.

While this does not cause an error so to speak, it does cause the SDK to have unexpected behaviour and debug messages will assist in getting to the bottom of this quicker.

Describe alternatives you've considered
NA

Additional context
Please add this to the list of things that needs to be documented for developers of the SDK.

@devraj devraj added documentation Improvements or additions to documentation enhancement New feature or request labels May 27, 2024
@devraj devraj added this to the alpha-3 milestone May 27, 2024
@devraj devraj self-assigned this May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant