Skip to content

Fix logging doc: change x.level to x.levelno#5866

Merged
nicoddemus merged 1 commit intopytest-dev:masterfrom
jamescooke:patch-1
Sep 21, 2019
Merged

Fix logging doc: change x.level to x.levelno#5866
nicoddemus merged 1 commit intopytest-dev:masterfrom
jamescooke:patch-1

Conversation

@jamescooke
Copy link
Contributor

A tiny fix in the docs that caught me out... Just validating my debugging here:

ipdb> record = caplog.records[0]

ipdb> dir(record)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'args', 'created', 'exc_info', 'exc_text', 'filename', 'funcName', 'getMessage', 'levelname', 'levelno', 'lineno', 'message', 'module', 'msecs', 'msg', 'name', 'pathname', 'process', 'processName', 'relativeCreated', 'stack_info', 'thread', 'threadName']

ipdb> record.levelno
10

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, appreciate it!

@nicoddemus nicoddemus merged commit 1b4ad77 into pytest-dev:master Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants