diff options
author | Ib Lundgren <ib.lundgren@gmail.com> | 2014-09-24 14:52:53 +0100 |
---|---|---|
committer | Ib Lundgren <ib.lundgren@gmail.com> | 2014-09-24 14:52:53 +0100 |
commit | edab385f951e38d65a25003f193793b63037bdec (patch) | |
tree | 0c5658eacb8aeca13556314cd0cffdf1db88f5c9 /oauthlib/common.py | |
parent | 3bb2bfbb593386169e997e3332b236c077a546db (diff) | |
download | oauthlib-edab385f951e38d65a25003f193793b63037bdec.tar.gz |
Change logging namespace to a tiered one.
Rather than have all logging under oauthlib we now have it
per file using __name__. Users who wish to enable or disable
all logging can still do so by enabling or disabling the
oauthlib logging namespace.
Diffstat (limited to 'oauthlib/common.py')
-rw-r--r-- | oauthlib/common.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/oauthlib/common.py b/oauthlib/common.py index 2ffdea9..9e8c175 100644 --- a/oauthlib/common.py +++ b/oauthlib/common.py @@ -10,7 +10,6 @@ from __future__ import absolute_import, unicode_literals import collections import datetime -import logging import random import re import sys @@ -43,20 +42,6 @@ always_safe = ('ABCDEFGHIJKLMNOPQRSTUVWXYZ' PY3 = sys.version_info[0] == 3 -# Logger used throughout oauthlib -log = logging.getLogger('oauthlib') -# Add a NullHandler to prevent warnings for users who don't wish -# to configure logging. -try: - log.addHandler(logging.NullHandler()) -# NullHandler gracefully backported to 2.6 -except AttributeError: - class NullHandler(logging.Handler): - - def emit(self, record): - pass - log.addHandler(NullHandler()) - if PY3: unicode_type = str bytes_type = bytes |