aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/__init__.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2013-01-24 02:31:52 -0500
committerW. Trevor King <wking@tremily.us>2013-01-24 02:36:22 -0500
commit932679f1e82a57feb4743e52d6c60f7331f057c2 (patch)
tree21c014cf36c8c159b7e5bf4627abf94b2e7a371b /libbe/__init__.py
parent182a556397c2b0f4638991942c736c5daff17111 (diff)
downloadbugseverywhere-932679f1e82a57feb4743e52d6c60f7331f057c2.tar.gz
Transition to libbe.LOG for logging
This makes it easier to tweak log verbosity and redirect logs to other handlers. For example, the WSGI servers are unstable with stderr closed, and crash with an IOError if they try to print a warning to stderr.
Diffstat (limited to 'libbe/__init__.py')
-rw-r--r--libbe/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbe/__init__.py b/libbe/__init__.py
index efd744a..b297636 100644
--- a/libbe/__init__.py
+++ b/libbe/__init__.py
@@ -37,6 +37,14 @@ The available submodules are:
* :py:mod:`libbe._version`
"""
+import logging as _logging
+
+
+LOG = _logging.getLogger('be')
+LOG.addHandler(_logging.StreamHandler())
+LOG.setLevel(_logging.ERROR)
+
+
TESTING = False
"""Flag controlling test-suite generation.