 
   wrapApi = require './wrap-api.coffee'
   handleIncomingMessage = require '../incoming-message-handler.coffee'
+
+  enableLogging = require '../logging.coffee'
 
   # ready states:
   [ NOTREADY, READY, CLOSED ] = [0,1,3]

    @options.autoConnect   ?= yes
    @options.autoReconnect ?= yes

    @readyState = NOTREADY

    @initBackoff()  if @options.autoReconnect


    @proto.on 'request', (req) =>
      @ready => @ws.send JSON.stringify req
      @emit 'debug', "Sending: ", JSON.stringify req
      return

    @connect()  if @options.autoConnect
