Skip to content

Commit

Permalink
logging: do not change the root logger's level
Browse files Browse the repository at this point in the history
Fixes #572
  • Loading branch information
blueyed authored and tim-schilling committed Feb 28, 2015
1 parent 6270a9e commit 7d29b40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion debug_toolbar/panels/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def emit(self, record):

collector = LogCollector()
logging_handler = ThreadTrackingHandler(collector)
logging.root.setLevel(logging.NOTSET)
logging.root.addHandler(logging_handler)


Expand Down
4 changes: 4 additions & 0 deletions tests/panels/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def setUp(self):
self.logger = logging.getLogger(__name__)
collector.clear_collection()

# Assume the root logger has been configured with level=DEBUG.
# Previously DDT forcefully set this itself to 0 (NOTSET).
logging.root.setLevel(logging.DEBUG)

def test_happy_case(self):
self.logger.info('Nothing to see here, move along!')

Expand Down

0 comments on commit 7d29b40

Please sign in to comment.