Commit Graph

9 Commits

Author SHA1 Message Date
Thomas Waldmann c4dae52ca4 configure logging via env var, use LazyLogger
logging.raiseExceptions not needed any more for py >= 3.2
2015-11-21 01:14:07 +01:00
Thomas Waldmann 6d5cc06cf6 remove unused imports, add missing imports 2015-11-02 20:36:13 +01:00
Thomas Waldmann d8d3c8521b fix logging levels
All normal informational output is now logged at INFO level.
To actually see normal output, the logger is configured to level INFO also.

Log levels:
WARNING is for warnings, ERROR is for (fatal) errors, DEBUG is for debugging.

logging levels must only be used according to this semantics and must not be
(ab)used to let something show up (although the logger would usually hide it)
or hide something (although the logger would usually show it).

Controlling the amount of output shown on INFO level:
--verbose, --progress, --stats are currently used for this.
more such flags might be added later as needed.

if they are set, more output is logged (at INFO level).

also: change strange setup_logging return value
2015-10-23 02:29:41 +02:00
Antoine Beaupré 8651f87fa1 fix flake8 warnings in my recent PRs 2015-10-20 14:43:49 -04:00
Antoine Beaupré dbc183f87f drop support for Python 2 2015-10-09 14:13:58 -04:00
Antoine Beaupré a42a5e3e2d fix all logger pep8 warnings except long lines 2015-10-08 16:50:44 -04:00
Antoine Beaupré 26561a7766 factor out logger object initialisation 2015-10-06 12:57:27 -04:00
Antoine Beaupré 2d0dae4e8b move logging setup to logger module 2015-10-06 12:57:26 -04:00
Antoine Beaupré c9b11316ab use a module-specific logger instead of global one
that way we have one logger per module, and we can pick and choose
which module we want verbose, for example
2015-10-02 11:05:44 -04:00