Skip to content

Commit 5a0914d

Browse files
authored
Remove NSLog call in FIRDocumentSnapshot (#3213)
1 parent 1de21a8 commit 5a0914d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Firestore/Source/API/FIRDocumentSnapshot.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "Firestore/core/src/firebase/firestore/model/field_value_options.h"
4141
#include "Firestore/core/src/firebase/firestore/nanopb/nanopb_util.h"
4242
#include "Firestore/core/src/firebase/firestore/util/hard_assert.h"
43+
#include "Firestore/core/src/firebase/firestore/util/log.h"
4344
#include "Firestore/core/src/firebase/firestore/util/string_apple.h"
4445

4546
namespace util = firebase::firestore::util;
@@ -261,12 +262,11 @@ - (id)convertedReference:(const FieldValue &)value {
261262
const DatabaseId &refDatabase = ref.database_id();
262263
const DatabaseId &database = _snapshot.firestore()->database_id();
263264
if (refDatabase != database) {
264-
// TODO(b/32073923): Log this as a proper warning.
265-
NSLog(@"WARNING: Document %@ contains a document reference within a different database "
266-
"(%s/%s) which is not supported. It will be treated as a reference within the "
267-
"current database (%s/%s) instead.",
268-
self.reference.path, refDatabase.project_id().c_str(), refDatabase.database_id().c_str(),
269-
database.project_id().c_str(), database.database_id().c_str());
265+
LOG_WARN("Document %s contains a document reference within a different database (%s/%s) which "
266+
"is not supported. It will be treated as a reference within the current database "
267+
"(%s/%s) instead.",
268+
_snapshot.CreateReference().Path(), refDatabase.project_id(),
269+
refDatabase.database_id(), database.project_id(), database.database_id());
270270
}
271271
const DocumentKey &key = ref.key();
272272
return [[FIRDocumentReference alloc] initWithKey:key firestore:_snapshot.firestore()];

0 commit comments

Comments
 (0)