Skip to content

bpo-33165: Added stacklevel parameter to logging APIs. #7424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2018
Merged

bpo-33165: Added stacklevel parameter to logging APIs. #7424

merged 2 commits into from
Jun 5, 2018

Conversation

vsajip
Copy link
Member

@vsajip vsajip commented Jun 5, 2018

The third keyword argument is *extra* which can be used to pass a
The third optional keyword argument is *stacklevel*, which defaults to ``1``.
If greater than 1, the corresponding number of stack frames are skipped
when computing the line number and function name set in the LogRecord
Copy link
Contributor

Choose a reason for hiding this comment

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

Should LogRecord be a link, i.e. :class:`LogRecord`?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I will update the PR. Thanks for spotting it!

Copy link
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

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

Yay! Thank you very much for implementing this :)

@vsajip vsajip merged commit dde9fdb into python:master Jun 5, 2018
@vsajip vsajip deleted the fix-33165 branch June 5, 2018 16:24
evandrocoan added a commit to evandrocoan/debugtools that referenced this pull request Dec 27, 2019
arguments but 3 were given due:

bpo-33165: Added stacklevel parameter to logging APIs
python/cpython#7424
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.

5 participants