         msg = JSON.stringify(params)
         bytes = msg.length
         @bytesReceived += bytes
-        @logStream.write("#{Date()}  -- Recv #{bytes} characters (#{msg})\n")
+        @bwLogStream.write("#{Date()}  -- Recv #{bytes} characters (#{msg})\n")
         @clientAPI.DOMUpdate(params)
 
     processComponentEvent : (params) ->
+        msg = JSON.stringify(params)
+        bytes = msg.length
+        @bytesReceived += bytes
+        @bwLogStream.write("#{Date()}  -- Recv #{bytes} characters (#{msg})\n")
         node = @dom.nodes.get(params.nodeID)
         if !node
             throw new Error("Invalid component nodeID: #{params.nodeID}")

                    args = Array.prototype.slice.call(arguments)
                    args.push('\n')
                    str = args.join(' ')
                    self.logStream.write(str)
                    self.emit('log', str)

        if process.env.TESTS_RUNNING

        msg = JSON.stringify(params)
        bytes = msg.length
        @bytesReceived += bytes
        @bwLogStream.write("#{Date()}  -- Recv #{bytes} characters (#{msg})\n")
        @pauseRendering()
        @events.processEvent(params)
        @resumeRendering()
