Skip to content

Use logging instead of print #117

Closed

Description

@tfardet

It would be nice to have the ability to hide messages from pynsee.
This would be possible if logging was used rather than calls to print (e.g. for cached data or during requests.

With a logger, the importance of each log could be set independently (e.g. messages about the use of cached data could be INFO while some issues with requests would be WARNING, ERROR, or CRITICAL) which would let people filter the levels they don't care about.

If necessary, the default visibility can be set to INFO so that all messages are still printed when nothing is changed.

Cf. https://docs.python.org/3/howto/logging.html for examples.

Activity

  1. added
    enhancement
    on Feb 20, 2023
  2. lgeo3 commented on Mar 1, 2023

    @lgeo3

    I'll be happy to work on this one, it seems to be a good issue for a first contribution if you agree ?

  3. tfardet commented on Mar 1, 2023

    @tfardet
    CollaboratorAuthor

    Ah yes, that would be great, I thought I'd have time to work on pynsee for a bit but that did not happen, unfortunately... will be happy to review a PR, though :)

  4. linked a pull request that will close this issuefeat: use logging to replace print #117 #129on Mar 22, 2023
  5. linked a pull request that will close this issueAdd logging features #143on May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions