     for property, id of projection.collections
       collectionIds.push(id) if projection[property]
     return collectionIds
+
+  _logMsg: (message) ->
+    "#{@configuration.appId}: #{this}: #{message}"

      if inMemoryData.length
        realCollection.batchInsert inMemoryData
      else
        throw new Error "No data to insert after replaying events for #{collectionId}"
      # Restore original collections
      @injector.override(collectionId).to realCollection



  dependencies: {
    commitStore: 'Space.eventSourcing.CommitStore'
    configuration: 'configuration'
    injector: 'Injector'
    mongo: 'Mongo'
    log: 'log'
  }

  rebuild: (projections, options) ->
