From edab385f951e38d65a25003f193793b63037bdec Mon Sep 17 00:00:00 2001 From: Ib Lundgren Date: Wed, 24 Sep 2014 14:52:53 +0100 Subject: 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. --- oauthlib/common.py | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'oauthlib/common.py') 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 -- cgit v1.2.1