       sync_goto: true
 
   log: (message) ->
-    @conn.log message
+    StateChangeLogger.log 'NSQDConnection', @current_state_name, @conn?.id,
+      message
 
   afterIdentify: ->
     'SUBSCRIBE'

        @stop()
        @conn.destroy()
        @conn.emit NSQDConnection.CLOSED
        @conn = null

      close: ->
        # No-op. Once closed, subsequent calls should do nothing.


  connectionState: ->
    @statemachine or new ConnectionState this

  connect: ->
    # Using nextTick so that clients of Reader can register event listeners
