-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-92592: Allow logging filters to return a LogRecord. (GH-92591) #92591
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
Changes from 1 commit
3aeeba6
1e4d27f
b526a35
f1ea183
19561d3
14e704d
4d34540
a69e76a
67453f6
b1e1084
f72c594
225329f
735d78a
5e54c77
f52e404
46e2f7f
7a0f470
643551d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -662,8 +662,8 @@ empty string, all events are passed. | |
|
|
||
| .. method:: filter(record) | ||
|
|
||
| Is the specified record to be logged? Returns zero for no, nonzero for | ||
| yes. Filters can also modify log records in-place or return a completely | ||
| Is the specified record to be logged? Returns falsy for no, truthy for | ||
| yes. Filters can either modify log records in-place or return a completely | ||
| different record instance which will replace the original | ||
| log record without modifying it. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the without modifying it should be replaced by in any future processing of the event. |
||
|
|
||
|
|
@@ -689,7 +689,7 @@ which has a ``filter`` method with the same semantics. | |
|
|
||
| .. versionchanged:: 3.12 | ||
| You can now return a :class:`LogRecord` instance from filters to replace | ||
| the log record without modifying it in place. This allows filters installed | ||
| the log record without modifying it in place. This allows filters attached to | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. without -> , rather than |
||
| on a :class:`Handler` to modify the log record before it is emitted without | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. attached to a handler, not attached to on a handler.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thank you, corrected |
||
| having side effects on other handlers. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| Let :mod:`logging` Filters to return a :class:`logging.LogRecord` instance | ||
| so that :class:`logging.Handler`\ s can enrich records without side effects on | ||
| other Handlers. | ||
| Let :mod:`logging` filters to return a :class:`logging.LogRecord` instance | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still says Let ... to which is incorrect. Did you forget to make this change, which I suggested earlier?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it looks like I missed that part of the comment, thank you for bringing it back up and for your patience |
||
| so that filters attached to :class:`logging.Handler`\ s can enrich records without | ||
| side effects on other handlers. | ||
Uh oh!
There was an error while loading. Please reload this page.