[internals] Fix a couple of missing log references

This commit is contained in:
Chris Bianca 2017-12-27 15:29:38 +00:00
parent 61d7c3b2eb
commit 1f29354145
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import CollectionReference from './CollectionReference';
import DocumentSnapshot from './DocumentSnapshot';
import { buildNativeMap } from './utils/serialize';
import { getAppEventName, SharedEventEmitter } from '../../utils/events';
import { getLogger } from '../../utils/log';
import { firestoreAutoId, isFunction, isObject, isString } from '../../utils';
import type Firestore from './';
@ -197,7 +198,7 @@ export default class DocumentReference {
* @param listener
*/
_offDocumentSnapshot(listenerId: string, listener: Function) {
this._firestore.log.info('Removing onDocumentSnapshot listener');
getLogger(this._firestore).info('Removing onDocumentSnapshot listener');
SharedEventEmitter.removeListener(getAppEventName(this._firestore, `onDocumentSnapshot:${listenerId}`), listener);
SharedEventEmitter.removeListener(getAppEventName(this._firestore, `onDocumentSnapshotError:${listenerId}`), listener);
this._firestore._native

View File

@ -6,6 +6,7 @@ import DocumentSnapshot from './DocumentSnapshot';
import QuerySnapshot from './QuerySnapshot';
import { buildNativeArray, buildTypeMap } from './utils/serialize';
import { getAppEventName, SharedEventEmitter } from '../../utils/events';
import { getLogger } from '../../utils/log';
import { firestoreAutoId, isFunction, isObject } from '../../utils';
import type Firestore from './';
@ -335,7 +336,7 @@ export default class Query {
* @param listener
*/
_offCollectionSnapshot(listenerId: string, listener: Function) {
this._firestore.log.info('Removing onQuerySnapshot listener');
getLogger(this._firestore).info('Removing onQuerySnapshot listener');
SharedEventEmitter.removeListener(getAppEventName(this._firestore, `onQuerySnapshot:${listenerId}`), listener);
SharedEventEmitter.removeListener(getAppEventName(this._firestore, `onQuerySnapshotError:${listenerId}`), listener);
this._firestore._native