jellyfin-apiclient-python
jellyfin-apiclient-python copied to clipboard
Logs report information not useful to end users at the `INFO` level
Much of the internal workings of the API client are reported at the INFO log level, which isn't appropriate for a library. A user-facing script or app should report only when it does something that it's expected to do at the INFO level, but if their code uses logging.basicConfig(level=logging.INFO) then jellyfin-apiclient-python reports various internal workings to the end user at the INFO level such as sent requests.
As a library, almost all, if not all, logging.info(...) calls should be changed to logging.debug(...).
In case it helps anyone else, I'm using the following to workaround this:
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
if not DEBUG:
logging.getLogger("JELLYFIN").setLevel(logging.WARNING)
sys.exit(main())