         if res.message.user.room?
             log_message(logs_root,date,type,room,{ 'message' : res.message.text , 'user' : user })
         else
-            robot.logger.debug "Private message: #{res.message.text} will not show in logs."
+            robot.logger.debug "ignoring private message: #{res.message.text}"
             return
 
     # Add a listener that matches all messages and calls log_message with redis and robot instances and a Response object

log_streams = {}

log_message = (root,date,type,channel,meta) ->
    mkdirp(path.resolve root,channel)
    log_file = path.resolve root,channel,date.toString("%Y-%m-%d") + '.txt'
    meta.date = date
    meta.channel = channel
    meta.type = type
    fs.appendFile log_file,JSON.stringify(meta) + '\n',(err) ->
        if err
            throw err

escapeHtml = (text) ->
  map =

        reply: robot.Response.prototype.reply

    robot.Response.prototype.send = (strings...) ->
        robot.logger.debug "Logging response.send"
        if not @message.room == null
            log_response @message.room, strings...
        else
            robot.logger.debug "Response.send has room: null"
            log_response @message.room, strings...
        response_orig.send.call @,strings...

    robot.Response.prototype.reply = (strings...) ->
        robot.logger.debug "Logging response.reply"
        log_response @message.room, strings...
        response_orig.reply.call @,strings...

