classification
Title: logging docs don't document integer constants
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, follower, python-dev, vinay.sajip
Priority: normal Keywords:

Created on 2013-12-05 23:16 by follower, last changed 2013-12-19 11:51 by python-dev. This issue is now closed.

Messages (4)
msg205334 - (view) Author: (follower) Date: 2013-12-05 23:16
The logging module documentation <http://docs.python.org/3.4/library/logging.html> makes reference to the levels DEBUG, INFO etc (e.g. in <http://docs.python.org/3.4/library/logging.html#logging.Logger.setLevel>) but AFAICT these constants are not documented in the module itself.

e.g I would expect a section like this

Level Constants
logging.DEBUG 10
logging.INFO  20
etc etc

(Although the actual values may not be listed depending on what your policy is for documenting "magic numbers".)
msg206552 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-12-18 21:36
The levels are documented here:

http://docs.python.org/howto/logging.html#logging-levels
msg206585 - (view) Author: (follower) Date: 2013-12-19 07:31
Thanks for pointing out that link. It's good to know the information is documented somewhere.

However, given that <http://docs.python.org/2/library/logging.html> is described as "the API reference" and seems to be the canonical logging library reference (rather than a tutorial) it would be appropriate to--and I would expect it to--include the constants information in it.

Thus I would request you reconsider the "invalid" resolution on this basis. Thanks.
msg206606 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-19 11:51
New changeset 16bfddf5a091 by Vinay Sajip in branch '2.7':
Issue #19902: Added list of logging levels.
http://hg.python.org/cpython/rev/16bfddf5a091

New changeset e812094d42f9 by Vinay Sajip in branch '3.3':
Issue #19902: Added list of logging levels.
http://hg.python.org/cpython/rev/e812094d42f9

New changeset 45bd58a15bb9 by Vinay Sajip in branch 'default':
Closes #19902: Merged update from 3.3.
http://hg.python.org/cpython/rev/45bd58a15bb9
History
Date User Action Args
2013-12-19 11:51:34python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg206606

resolution: not a bug -> fixed
stage: resolved
2013-12-19 07:31:56followersetstatus: pending -> open

messages: + msg206585
2013-12-18 21:36:37vinay.sajipsetstatus: open -> pending

nosy: + vinay.sajip
messages: + msg206552

resolution: not a bug
2013-12-05 23:16:31followercreate