 
       restrictedQuery = KodingLogger.generateRestrictedQuery group, query
 
+      identifiers = []
+      for _scope in KodingLogger.SCOPES
+        identifiers.push KodingLogger.getIdentifier _scope, group
+
       expect restrictedQuery
         .to.exist
-        .to.be.equal "([log:apple] OR [error:apple] OR [warn:apple] OR [info:apple]) AND #{query}"
+        .to.be.equal "(#{identifiers.join ' OR '}) AND #{query}"
 
       done()
 

      restrictedQuery = KodingLogger
        .generateRestrictedQuery group, query, scope

      expect restrictedQuery
        .to.exist
        .to.be.equal "[#{scope}:#{group}]"

      done()



      query = KodingLogger.generateRestrictedQuery group, log, scope

      identifier = KodingLogger.getIdentifier scope, group

      KodingLogger.connect()

      KodingLogger.pt.on 'connect', ->
