-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Pub/Sub logging hygiene. #4471
Pub/Sub logging hygiene. #4471
Conversation
@@ -167,7 +191,7 @@ def on_response(self, response): | |||
For each message, schedule a callback with the executor. | |||
""" | |||
for msg in response.received_messages: | |||
_LOGGER.debug('New message received from Pub/Sub: %r', msg) | |||
_LOGGER.debug('New message received from Pub/Sub:\n%r', msg) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uses newline character when logging protobufs that may end up having newlines in them. These are harder to grok in the log output since it "blends" the protobuf and the description. For example. Received response: received_messages { ack_id: "Pn41MEV..." message { data: ... vs. Received response: received_messages { ack_id: "Pn41MEV..." message { data: ... Also - replaced a lambda with a simple function - added docstrings to two default callbacks used by the `policy.thread.Policy` implementation. - updated grammatical error in a comment - replaced a bare `if future` with `if future is not None`
70811e3
to
ff558ad
Compare
Changed 3 instances of |
Uses newline character when logging protobufs that may end up having newlines in them. These are harder to grok in the log output since it "blends" the protobuf and the description. For example.
vs.
Also
lambda
with a simple functionpolicy.thread.Policy
implementation.if future
withif future is not None
Context: I have discovered each of these "issues" while dealing with #4463 and #4234.