Skip to content

Commit 9ea5bd6

Browse files
authored
Log stream errors (#3828)
This is in response to #3817. This is also more consistent with other platforms (e.g., Android [does](https://github.com/firebase/firebase-android-sdk/blob/master/firebase-firestore/src/main/java/com/google/firebase/firestore/remote/AbstractStream.java#L147) log the error). The resulting log messages look like this: ``` 2019-09-11 14:44:03.939778-0400 Firestore_Example_iOS[30490:61949945] 6.8.1 - [Firebase/Firestore][I-FST000001] WriteStream (7f92506abd20) Stream error: 'Not found: No document to update: <document id here, omitted>' 2019-09-11 14:45:01.067452-0400 Firestore_Example_iOS[30490:61949544] 6.8.1 - [Firebase/Firestore][I-FST000001] WriteStream (7f9212de8040) Stream error: 'Permission denied: Missing or insufficient permissions.' ```
1 parent 14109c4 commit 9ea5bd6

File tree

1 file changed

+1
-2
lines changed
  • Firestore/core/src/firebase/firestore/remote

1 file changed

+1
-2
lines changed

Firestore/core/src/firebase/firestore/remote/stream.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,8 @@
292292

293293
void Stream::OnStreamFinish(const Status& status) {
294294
EnsureOnQueue();
295-
// TODO(varconst): log error here?
296-
LOG_DEBUG("%s Stream error", GetDebugDescription());
297295

296+
LOG_DEBUG("%s Stream error: '%s'", GetDebugDescription(), status.ToString());
298297
Close(status);
299298
}
300299

0 commit comments

Comments
 (0)