Skip to content

pubsub: make Publisher log less chatty#1749

Merged
pongad merged 1 commit intogoogleapis:masterfrom
pongad:publisher-log-level
Mar 15, 2017
Merged

pubsub: make Publisher log less chatty#1749
pongad merged 1 commit intogoogleapis:masterfrom
pongad:publisher-log-level

Conversation

@pongad
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor

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
meltsufin pushed a commit that referenced this pull request Dec 22, 2025
* chore(main): release 3.21.2-SNAPSHOT

* chore: generate libraries at Mon Jan 13 17:03:24 UTC 2025

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
chingor13 pushed a commit that referenced this pull request Feb 24, 2026
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 11, 2026
* chore(main): release 3.21.2-SNAPSHOT

* chore: generate libraries at Mon Jan 13 17:03:24 UTC 2025

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
chingor13 pushed a commit that referenced this pull request Mar 12, 2026
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
…o v1.125.3 (#1749)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.125.3

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request May 1, 2026
…o v1.125.3 (#1749)

* chore(deps): update dependency com.google.cloud:google-cloud-pubsub to v1.125.3

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
meltsufin pushed a commit that referenced this pull request May 2, 2026
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