Skip to content

Commit

Permalink
disable cache related logs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreymikhadyuk committed Dec 6, 2023
1 parent 0cf1236 commit fcce158
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/services/Discussion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class DiscussionService {
const fromCache = snapshot.metadata.fromCache ? "local cache" : "server";
const discussion = snapshot?.data() || null;

console.log(
`getDiscussionById [${fromCache}]`,
discussionId,
snapshot?.data() || null,
);
// console.log(
// `getDiscussionById [${fromCache}]`,
// discussionId,
// snapshot?.data() || null,
// );
if (!discussion && source === FirestoreDataSource.Cache) {
return this.getDiscussionById(discussionId, FirestoreDataSource.Server);
}
Expand Down Expand Up @@ -87,10 +87,10 @@ class DiscussionService {
const source = snapshot.metadata.fromCache ? "local cache" : "server";

if (discussion) {
console.log(`discussion found! [${source}]`, discussionId);
// console.log(`discussion found! [${source}]`, discussionId);
callback(discussion);
} else {
console.log(`discussion was not found [${source}]`, discussionId);
// console.log(`discussion was not found [${source}]`, discussionId);
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion src/shared/utils/firebase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (REACT_APP_ENV === Environment.Local) {
});
}

firebase.firestore.setLogLevel("debug");
// firebase.firestore.setLogLevel("debug");

export const isFirebaseError = (error: any): error is FirebaseError =>
(error && error.code && error.code.startsWith("auth/")) ||
Expand Down

0 comments on commit fcce158

Please sign in to comment.