From 5375c9477d12aaf0b83e7d0d0bf0873c475c7e64 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 20 Jul 2012 14:46:08 -0400 Subject: [PATCH] Add igor.LOG for easier debugging. --- igor/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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')) -- 2.26.2