-
Notifications
You must be signed in to change notification settings - Fork 1.1k
pubsub: make Publisher log less chatty #1749
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
Changes Unknown when pulling b28bffa on pongad:publisher-log-level into ** on GoogleCloudPlatform:master**. |
setupDurationBasedPublishAlarm(); | ||
} else if (currentAlarmFuture != null) { | ||
logger.log(Level.INFO, "Cancelling alarm"); | ||
logger.log(Level.FINER, "Cancelling alarm, no more messages"); |
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.
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.
@jabubake @garrettjonesgoogle @pongad I find I disagree w/ Garrett -- What I'd really want in many of these places is a logOnce primitive, but that's not part of any of the loggers.
setupDurationBasedPublishAlarm(); | ||
} else if (currentAlarmFuture != null) { | ||
logger.log(Level.INFO, "Cancelling alarm"); | ||
logger.log(Level.FINER, "Cancelling alarm, no more messages"); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
if (bundleToSend != null) { | ||
logger.log(Level.INFO, "Scheduling a bundle for immediate sending."); | ||
logger.log(Level.FINER, "Scheduling a bundle for immediate sending."); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
if (hasBundlingBytes() && messageSize >= getMaxBundleBytes()) { | ||
logger.log( | ||
Level.INFO, "Message exceeds the max bundle bytes, scheduling it for immediate send."); | ||
Level.FINER, "Message exceeds the max bundle bytes, scheduling it for immediate send."); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@Override | ||
public void run() { | ||
logger.log(Level.INFO, "Sending messages based on schedule."); | ||
logger.log(Level.FINER, "Sending messages based on schedule."); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
if (!activeAlarm.getAndSet(true)) { | ||
long delayThresholdMs = getBundlingSettings().getDelayThreshold().getMillis(); | ||
logger.log(Level.INFO, "Setting up alarm for the next {0} ms.", delayThresholdMs); | ||
logger.log(Level.FINER, "Setting up alarm for the next {0} ms.", delayThresholdMs); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM, since @lesv thinks |
Fixes #1681.