Skip to content

Use logger instead of prints #22

@guilyx

Description

@guilyx
import logging
logging.basicConfig(filename='app.log', encoding='utf-8', level=logging.DEBUG)
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')
logging.error('And non-ASCII stuff, too, like Øresund and Malmö')
  • Add app.log to gitignore
  • Replace info prints by logging.info
  • Replace non critical failures by logging.debug (ex: when no path is found)
  • Add error logging on critical failures (not sure yet if there should be any)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions