@@ -273,7 +273,8 @@ public void processReceivedMessages(List<com.google.pubsub.v1.ReceivedMessage> r
273273 ackHandlers .add (new AckHandler (pubsubMessage .getAckId (), messageSize ));
274274 }
275275 Instant expiration = now .plus (messageDeadlineSeconds * 1000 );
276- logger .log (Level .INFO , "Received " + responseMessages .size () + " messages at " + now );
276+ logger .log (
277+ Level .FINER , "Received {0} messages at {1}" , new Object [] {responseMessages .size (), now });
277278
278279 messagesWaiter .incrementPendingMessages (responseMessages .size ());
279280 Iterator <AckHandler > acksIterator = ackHandlers .iterator ();
@@ -364,13 +365,9 @@ public void run() {
364365 ((long ) Math .ceil (now .plus (ackExpirationPadding ).plus (500 ).getMillis () / 1000.0 ))
365366 * 1000L );
366367 logger .log (
367- Level .INFO ,
368- "Running alarm sent outstanding acks, at now time: "
369- + now
370- + ", with cutover time: "
371- + cutOverTime
372- + ", padding: "
373- + ackExpirationPadding );
368+ Level .FINER ,
369+ "Running alarm sent outstanding acks, at time: {0}, with cutover time: {1}, padding: {2}" ,
370+ new Object [] {now , cutOverTime , ackExpirationPadding });
374371 Instant nextScheduleExpiration = null ;
375372 List <PendingModifyAckDeadline > modifyAckDeadlinesToSend = new ArrayList <>();
376373
@@ -421,12 +418,9 @@ public void run() {
421418
422419 if (nextScheduleExpiration != null ) {
423420 logger .log (
424- Level .INFO ,
425- "Scheduling based on outstanding, now time: "
426- + now
427- + ", "
428- + "next schedule time: "
429- + nextScheduleExpiration );
421+ Level .FINER ,
422+ "Scheduling based on outstanding, at time: {0}, next scheduled time: {1}" ,
423+ new Object [] {now , nextScheduleExpiration });
430424 setupNextAckDeadlineExtensionAlarm (nextScheduleExpiration );
431425 }
432426 }
@@ -438,13 +432,11 @@ private void setupNextAckDeadlineExtensionAlarm(Instant expiration) {
438432 try {
439433 if (nextAckDeadlineExtensionAlarmTime .isAfter (possibleNextAlarmTime )) {
440434 logger .log (
441- Level .INFO ,
442- "Scheduling next alarm time: "
443- + possibleNextAlarmTime
444- + ", last alarm set to time: "
445- + nextAckDeadlineExtensionAlarmTime );
435+ Level .FINER ,
436+ "Scheduling next alarm time: {0}, previous alarm time: {1}" ,
437+ new Object [] {possibleNextAlarmTime , nextAckDeadlineExtensionAlarmTime });
446438 if (ackDeadlineExtensionAlarm != null ) {
447- logger .log (Level .INFO , "Canceling previous alarm" );
439+ logger .log (Level .FINER , "Canceling previous alarm" );
448440 ackDeadlineExtensionAlarm .cancel (false );
449441 }
450442
@@ -475,7 +467,7 @@ private void processOutstandingAckOperations(
475467 if (!pendingAcks .isEmpty ()) {
476468 try {
477469 acksToSend = new ArrayList <>(pendingAcks );
478- logger .log (Level .INFO , "Sending {0} acks" , acksToSend .size ());
470+ logger .log (Level .FINER , "Sending {0} acks" , acksToSend .size ());
479471 } finally {
480472 pendingAcks .clear ();
481473 }
@@ -488,7 +480,7 @@ private void processOutstandingAckOperations(
488480 for (String ackId : pendingNacks ) {
489481 nacksToSend .addAckId (ackId );
490482 }
491- logger .log (Level .INFO , "Sending {0} nacks" , pendingNacks .size ());
483+ logger .log (Level .FINER , "Sending {0} nacks" , pendingNacks .size ());
492484 } finally {
493485 pendingNacks .clear ();
494486 }
0 commit comments