Skip to content

Commit 22a41a2

Browse files
authored
fix: elide string processing of 'fine' level log messages unless they will actually be logged (#2055)
1 parent 6abf6d7 commit 22a41a2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ If you are using Maven without the BOM, add this to your dependencies:
4141
<dependency>
4242
<groupId>com.google.cloud</groupId>
4343
<artifactId>google-cloud-firestore</artifactId>
44-
<version>3.30.10</version>
44+
<version>3.30.11</version>
4545
</dependency>
4646

4747
```

google-cloud-firestore/src/main/java/com/google/cloud/firestore/SilenceableBidiStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public boolean isSilenced() {
6363
}
6464

6565
public void send(RequestT request) {
66-
LOGGER.fine(stream.toString());
66+
LOGGER.fine(stream::toString);
6767
stream.send(request);
6868
}
6969

google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ private void pushSnapshot(final Timestamp readTime, ByteString nextResumeToken)
474474
if (!hasPushed || !changes.isEmpty()) {
475475
final QuerySnapshot querySnapshot =
476476
QuerySnapshot.withChanges(query, readTime, documentSet, changes);
477-
LOGGER.fine(querySnapshot.toString());
477+
LOGGER.fine(querySnapshot::toString);
478478
userCallbackExecutor.execute(() -> listener.onEvent(querySnapshot, null));
479479
hasPushed = true;
480480
}

0 commit comments

Comments
 (0)