Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1d094af7
Commit
1d094af7
authored
Sep 22, 2019
by
Vinay Sajip
Committed by
GitHub
Sep 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated incorrect level-setting code to use setLevel(). (GH-16325)
parent
b104ecbb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
Lib/logging/config.py
Lib/logging/config.py
+6
-5
Lib/test/test_logging.py
Lib/test/test_logging.py
+1
-1
No files found.
Lib/logging/config.py
View file @
1d094af7
# Copyright 2001-201
6
by Vinay Sajip. All Rights Reserved.
# Copyright 2001-201
9
by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
...
...
@@ -19,7 +19,7 @@ Configuration functions for the logging package for Python. The core package
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
by Apache's log4j system.
Copyright (C) 2001-201
6
Vinay Sajip. All Rights Reserved.
Copyright (C) 2001-201
9
Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
...
...
@@ -173,9 +173,10 @@ def _handle_existing_loggers(existing, child_loggers, disable_existing):
for
log
in
existing
:
logger
=
root
.
manager
.
loggerDict
[
log
]
if
log
in
child_loggers
:
logger
.
level
=
logging
.
NOTSET
logger
.
handlers
=
[]
logger
.
propagate
=
True
if
not
isinstance
(
logger
,
logging
.
PlaceHolder
):
logger
.
setLevel
(
logging
.
NOTSET
)
logger
.
handlers
=
[]
logger
.
propagate
=
True
else
:
logger
.
disabled
=
disable_existing
...
...
Lib/test/test_logging.py
View file @
1d094af7
...
...
@@ -4315,7 +4315,7 @@ class BasicConfigTest(unittest.TestCase):
logging
.
_handlers
.
clear
()
logging
.
_handlers
.
update
(
self
.
saved_handlers
)
logging
.
_handlerList
[:]
=
self
.
saved_handler_list
logging
.
root
.
level
=
self
.
original_logging_level
logging
.
root
.
setLevel
(
self
.
original_logging_level
)
def
test_no_kwargs
(
self
):
logging
.
basicConfig
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment