From 147401d7420bc4f91daec3e2fd8e531c0ce69441 Mon Sep 17 00:00:00 2001 From: Conrad Dean Date: Wed, 28 Jan 2015 20:03:46 -0600 Subject: [PATCH] only set loglevel config when running cli by always setting the log level, you enforce that log level on every project that attempts to depend on the pep257 module. instead logging should be enabled for debug when needed. this fixes a bug in the flake8-docstrings plugin for flake8 --- pep257.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pep257.py b/pep257.py index 2b3371ff..f24508bc 100755 --- a/pep257.py +++ b/pep257.py @@ -25,8 +25,7 @@ except ImportError: # Python 2.x from configparser import RawConfigParser -log = logging.getLogger() -log.setLevel(logging.DEBUG) +log = logging.getLogger(__name__) try: @@ -546,6 +545,7 @@ def setup_stream_handler(options): def run_pep257(): + log.setLevel(logging.DEBUG) opt_parser = get_option_parser() # setup the logger before parsing the config file, so that command line # arguments for debug / verbose will be printed.