diff --git a/packages/mongo/collection.js b/packages/mongo/collection.js index 24e347fe36..87527f9863 100644 --- a/packages/mongo/collection.js +++ b/packages/mongo/collection.js @@ -698,10 +698,10 @@ Object.assign(Mongo.Collection.prototype, { var self = this; if (!self._collection._ensureIndex || !self._collection.createIndex) throw new Error("Can only call createIndex on server collections"); + // TODO enable this message a release before we will remove this function + // import { Log } from 'meteor/logging'; + // Log.debug(`_ensureIndex has been deprecated, please use the new 'createIndex' instead${options?.name ? `, index name: ${options.name}` : `, index: ${JSON.stringify(index)}`}`) if (self._collection.createIndex) { - import { Log } from 'meteor/logging'; - - Log.debug(`_ensureIndex has been deprecated, please use the new 'createIndex' instead${options?.name ? `, index name: ${options.name}` : `, index: ${JSON.stringify(index)}`}`) self._collection.createIndex(index, options); } else { self._collection._ensureIndex(index, options);