snapcraft is not using the python logger

Bug #1476452 reported by Leo Arias
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Low
Leo Arias

Bug Description

Snapcraft is just printing messages to stdout. Python has a nice logging module that's easy to use and gives a lot of nice features:
https://docs.python.org/3/howto/logging.html

So, I propose to remove the snapcraft.common.log function and instead, on each module that needs to log define the attribute:

logger = logging.getLogger(__name__)

Then replace all the calls to log with:

logger.info(message)

Related branches

Leo Arias (elopio)
Changed in snapcraft:
status: New → In Progress
assignee: nobody → Leo Arias (elopio)
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
milestone: none → 0.2
Changed in snapcraft:
importance: Undecided → Low
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.