Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f86aa7c commit 9466fe8Copy full SHA for 9466fe8
1 file changed
Doc/library/logging.rst
@@ -167,7 +167,8 @@ following example::
167
# command line argument. Convert to upper case to allow the user to
168
# specify --log=DEBUG or --log=debug
169
numeric_level = getattr(logging, loglevel.upper(), None)
170
- assert numeric_level is not None, 'Invalid log level: %s' % loglevel
+ if not isinstance(numeric_level, int):
171
+ raise ValueError('Invalid log level: %s' % loglevel)
172
logging.basicConfig(level=numeric_level, ...)
173
174
The call to :func:`basicConfig` should come *before* any calls to :func:`debug`,
0 commit comments