Add igor.LOG for easier debugging.
authorW. Trevor King <wking@tremily.us>
Fri, 20 Jul 2012 18:46:08 +0000 (14:46 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 20 Jul 2012 18:46:08 +0000 (14:46 -0400)
igor/__init__.py

index f7ea88fc1a178df9c2853fa6ae500041cda155b7..816051c499d21186a90e41277932287915e32df1 100644 (file)
@@ -3,3 +3,13 @@
 "Interface for reading binary IGOR files."
 
 __version__ = '0.2'
+
+
+import logging as _logging
+
+
+LOG = _logging.getLogger('igor')
+LOG.setLevel(_logging.ERROR)
+LOG.addHandler(_logging.StreamHandler())
+LOG.handlers[-1].setFormatter(
+    _logging.Formatter('%(name)s - %(levelname)s - %(message)s'))