Skip to content

Conversation

pongad
Copy link
Contributor

@pongad pongad commented Mar 14, 2017

Fixes #1681.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 14, 2017
@coveralls
Copy link

Coverage Status

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.

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.

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


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.

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.

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

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.

@garrettjonesgoogle
Copy link
Member

LGTM, since @lesv thinks FINER works fine for the logging level.

@pongad pongad merged commit ca51fe9 into googleapis:master Mar 15, 2017
@pongad pongad deleted the publisher-log-level branch March 15, 2017 00: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