PackageConfig should automatically add LOG to namespace.
authorW. Trevor King <wking@drexel.edu>
Thu, 28 Jul 2011 17:07:04 +0000 (13:07 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 28 Jul 2011 17:07:04 +0000 (13:07 -0400)
h5config/tools.py

index 38b872e2ff63f7ce4eab966cc66c336f5a7c53db..f7cd2e414ea8db310c467bc983d477712d4e25fd 100644 (file)
@@ -77,6 +77,8 @@ class PackageConfig (_config.Config):
         if not logger:
             logger = _log.get_basic_logger(package_name, level=_logging.WARN)
         self._logger = logger
+        if 'LOG' not in dir(namespace):
+            namespace.LOG = logger
 
     def _name(self):
         "Find this instance's name in the bound namespace"