                      "Tag:   " (or (:tag events) "-") "\n"))
        :short true}]}]})
 
-(defn extended-formatter [events]
+
+(defn extended-formatter
+  "Format an event as a Slack attachment with a series of fields."
+  [events]
   {:text "This event requires your attention!",
    :attachments
    [{:fallback

      {:title "Tags",
       :value (slack-escape (or (:tag events) "-"))
       :short true}]}]})

(defn slack
  "Posts events into a slack.com channel using Incoming Webhooks.

            [cheshire.core :as json])
  (:use [clojure.string :only [escape join upper-case]]))


(defn slack-escape
  "Escape message according to slack formatting spec."
  [message]
  (escape message {\< "&lt;" \> "&gt;" \& "&amp;"}))


(defn default-formatter
  "Simple formatter for rendering an event as a Slack attachment."
  [events]
  {:attachments
   [{:fields
     [{:title "Riemann Event"
