jellyfin-apiclient-python icon indicating copy to clipboard operation
jellyfin-apiclient-python copied to clipboard

Logs report information not useful to end users at the `INFO` level

Open rpatterson opened this issue 3 months ago • 1 comments

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(...).

rpatterson avatar Sep 10 '25 23:09 rpatterson

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())

rpatterson avatar Sep 10 '25 23:09 rpatterson