From: W. Trevor King Date: Fri, 20 Jul 2012 18:46:08 +0000 (-0400) Subject: Add igor.LOG for easier debugging. X-Git-Tag: v0.2~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5375c9477d12aaf0b83e7d0d0bf0873c475c7e64;p=igor.git Add igor.LOG for easier debugging. --- diff --git a/igor/__init__.py b/igor/__init__.py index f7ea88f..816051c 100644 --- a/igor/__init__.py +++ b/igor/__init__.py @@ -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'))