 
   missingEnvironmentForApi: (msg) ->
     missingAnything = false
-    unless logESUrl?
+    unless @logESUrl?
       msg.send "Ensure that GANDI_LOG_ES_URL is set."
       missingAnything |= true
-    unless logRooms?
+    unless @logRooms?
       msg.send "Ensure that GANDI_LOG_ROOMS is set."
       missingAnything |= true
-    unless logIndexName?
+    unless @logIndexName?
       msg.send "Ensure that GANDI_LOG_INDEX_NAME is set."
       missingAnything |= true
-    unless logKibanaUrlName?
-      msg.send "Ensure that GANDI_LOG_KIBANA_URL is set."
-      missingAnything |= true
-    unless logKibanaTemplateName?
-      msg.send "Ensure that GANDI_LOG_KIBANA_TEMPLATE is set."
-      missingAnything |= true
     missingAnything
 
 

        <h1>#{title}</h1>
    """

  foot_html = (url) ->
    "<div class=\"foot\">More Power on <a href=\"#{url}\">#{url}</a></div></body></html>"

  escape = (message) ->
    return message.replace(/&/g, '&amp;')
      .replace(/</g, '&lt;')
      .replace(/>/g, '&gt;')

    process.env.HUBOT_BASE_URL + path.join(robot.name, 'logs', room.slice(1))

  logMessageES: (log, room, msg) ->
    unless missingEnvironmentForApi(msg)
      if room in @logRooms
        date = moment.utc()
        log['@timestamp'] = date.format()
        json = JSON.stringify(log)

        index = @logIndexName
        index = index + '-' + date.format('YYYY.MM.DD')

        @robot.http(@logESUrl)
          .path(index + '/irclog/')
          .post(json) (err, res, body) ->
            if res.statusCode > 299
              @robot.logger.warning res.statusCode
              @robot.logger.warning body



