-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pubsub: make Subscriber logs less chatty #1748
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
Conversation
Also use text formatting so we don't unnecessarily allocate Strings when not logging. Fixes #1686.
|
Changes Unknown when pulling 419708f on pongad:subscriber-log-level into ** on GoogleCloudPlatform:master**. |
| Instant expiration = now.plus(messageDeadlineSeconds * 1000); | ||
| logger.log(Level.INFO, "Received " + responseMessages.size() + " messages at " + now); | ||
| logger.log( | ||
| Level.FINER, "Received {0} messages at {1}", new Object[] {responseMessages.size(), now}); |
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.
| + ", padding: " | ||
| + ackExpirationPadding); | ||
| Level.FINER, | ||
| "Running alarm sent outstanding acks, at time: {0}, with cutover time: {1}, padding {2}", |
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.
| @Override | ||
| protected void doStart() { | ||
| logger.log(Level.INFO, "Starting subscriber."); | ||
| logger.log(Level.FINE, "Starting subscriber."); |
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.
lesv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree w/ Garrett here - one time things are fine at INFO; I've suggested some shorthand, feel free to ignore.
| @Override | ||
| protected void doStart() { | ||
| logger.log(Level.INFO, "Starting subscriber."); | ||
| logger.log(Level.FINE, "Starting subscriber."); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| @Override | ||
| protected void doStart() { | ||
| logger.log(Level.INFO, "Starting subscriber."); | ||
| logger.log(Level.FINE, "Starting subscriber."); |
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.
| @Override | ||
| public void onCompleted() { | ||
| logger.log(Level.INFO, "Streaming pull terminated successfully!"); | ||
| logger.log(Level.FINE, "Streaming pull terminated successfully!"); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Changes Unknown when pulling a0628d2 on pongad:subscriber-log-level into ** on GoogleCloudPlatform:master**. |
|
@lesv @garrettjonesgoogle PTAL |
|
LGTM |
Also use text formatting so we don't unnecessarily allocate
Strings when not logging.
Fixes #1686.