Skip to content

Conversation

@pongad
Copy link
Contributor

@pongad pongad commented Mar 14, 2017

Also use text formatting so we don't unnecessarily allocate
Strings when not logging.

Fixes #1686.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 14, 2017
@pongad pongad changed the title logging: make Subscriber logs less chatty pubsub: make Subscriber logs less chatty Mar 14, 2017
Also use text formatting so we don't unnecessarily allocate
Strings when not logging.

Fixes #1686.
@coveralls
Copy link

Coverage Status

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.

This comment was marked as spam.

+ ", 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.

@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.

This comment was marked as spam.

Copy link
Contributor

@lesv lesv left a 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.

@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.

@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.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a0628d2 on pongad:subscriber-log-level into ** on GoogleCloudPlatform:master**.

@pongad
Copy link
Contributor Author

pongad commented Mar 15, 2017

@lesv @garrettjonesgoogle PTAL

@garrettjonesgoogle
Copy link
Member

LGTM

@pongad pongad merged commit d4be5e5 into googleapis:master Mar 15, 2017
@pongad pongad deleted the subscriber-log-level branch March 15, 2017 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants