Skip to content

Logging #3

@kahmali

Description

@kahmali

Logging is messy. Let's clean it up somehow.

This is a broad issue. Currently we need to do something like this:

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler(sys.stdout)
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
ch.setFormatter(formatter)
logger.addHandler(ch)

at some global level (currently the module level), so that we can do stuff like this within that scope:

logger.debug("Debug statement here")

I'd really prefer not to have that cruft in every module, so at the least we need to refactor it out somehow. Suggestions?

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions