Skip to content

Commit 3a989a8

Browse files
htgettoken: remove Python root logger configuration
closes #121
1 parent ced4471 commit 3a989a8

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

htgettoken/__init__.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,6 @@ def log(*args, **kwargs):
8484
print(" ".join(map(str,args)), file=logfile, **kwargs)
8585

8686

87-
class HtgettokenHandler(logging.StreamHandler):
88-
"""Custom logger handler for urllib3 to send output to our log function.
89-
"""
90-
def __init__(self):
91-
logging.StreamHandler.__init__(self)
92-
def emit(self, record):
93-
log(self.format(record))
94-
95-
root_logger = logging.getLogger()
96-
log_format = '%(name)s - %(levelname)s - %(message)s'
97-
log_handler = HtgettokenHandler()
98-
log_handler.setFormatter(logging.Formatter(log_format))
99-
root_logger.addHandler(log_handler)
100-
101-
10287
def logerr(*args, **kwargs):
10388
"""Always print to stderr.
10489
"""

0 commit comments

Comments
 (0)