Integrate standard python logging across the library and applications to ease debugging
- Lingua principale
- Python
- Stelle
- 17
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**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.
```py
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.