Merge lp:~nico44/joliebulle/logging into lp:joliebulle
Proposed by
Nico
Status: | Merged |
---|---|
Merged at revision: | 300 |
Proposed branch: | lp:~nico44/joliebulle/logging |
Merge into: | lp:joliebulle |
Diff against target: |
320 lines (+85/-20) 5 files modified
brewCalc.py (+4/-1) globals.py (+12/-2) main.py (+63/-15) outilEvaporation.py (+3/-1) preferences.py (+3/-1) |
To merge this branch: | bzr merge lp:~nico44/joliebulle/logging |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
314r | Pending | ||
Review via email: mp+125044@code.launchpad.net |
Description of the change
Ajout de l'utilisation de l'API logging.
Le logging est initialisé au démarrage. Le niveau et le format des traces est paramétrable dans la méthode initLogging(). Par défaut le niveau >=INFO apparait sur la console. Le niveau >=DEBUG apparait dans le fichier joliebulle.log
Pour l'utiliser dans un module il faut ajouter :
import logging
logger = logging.
en début de fichier. Ensuite on peut utiliser logger.debug() logger.info(), logger.warn(), etc. comme décrit ici : http://
To post a comment you must log in.