Skip to content

No more prints #1373

Open
Open

Description

@PeterSurda

There are still occasions where print has remained and should be replaced by the logger.*. Some can remain, e.g. the notification about daemonizing or missing dependencies. This issue will be updated as I find more locations.

  • src/api.py

Activity

  1. coffeedogs commented on Oct 19, 2018

    @coffeedogs
    Contributor

    @PeterSurda can we be clear about scope and expected results please? Some thoughts that come to mind:

    • Increase scope to use the opportunity of going through the code thoroughly with a mind on logging
    • Test various logging configurations (which?), remove config cruft, document what to expect out of logging, maybe testing further logging config examples (rsyslog, elasticsearch?)
    • Ensure log levels are appropriate and sent to stdout/stderr as appropriate
    • Consider consolidating the number of log levels in use
    • Consider any refactoring or standardisation of logging code (e.g. avoid code repetition, circular imports)
    • Consider whether a log entry is actually required; maybe the point of a log entry is to watch out for a condition that better testing could have guarded against
    • Ensure consistent log message style (tenses, first/third sing/pl person etc.)
    • Change print statements to use the logger
    • Implement tests around logging (critical examples?)

    Quick check of the scale of this task:
    12 logger.exception() calls
    12 logger.fatal() calls
    13 logger.critical() calls
    20 logger.warning() calls
    167 logger.info() calls
    185 logger.debug() calls
    467 (approx) print statements

  2. added this to the v0.6.4 milestone on Aug 27, 2020
  3. navjotcis commented on Sep 22, 2020

    @navjotcis
    Contributor

    I have removed the print statement of the api.py module.
    #1673

  4. linked a pull request that will close this issuereplace print statements with logger #1688on Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions