package_cache: Add a package-level logger
authorW. Trevor King <wking@tremily.us>
Thu, 20 Feb 2014 22:19:50 +0000 (14:19 -0800)
committerW. Trevor King <wking@tremily.us>
Thu, 20 Feb 2014 22:19:50 +0000 (14:19 -0800)
This gives us a single location for configuring verbosity, handlers,
etc., for submodule loggers.

package_cache/__init__.py

index a4dee9373f5a4450b8b39893778d102abb3772d6..4b7feef11fa4b030a5d2648cf3a4d35775867ede 100644 (file)
 
 "A caching proxy for package downloads"
 
+import logging as _logging
+
+
 __version__ = '0.0'
+
+LOG = _logging.getLogger(__name__)
+LOG.setLevel(_logging.WARNING)
+LOG.addHandler(_logging.StreamHandler())