             class: "tapestry-console",
             """
               <div class="message-container"></div>
-              <button data-action="clear" class="btn btn-mini"><i class="icon-remove"></i> Clear Console</button>
-              <button data-action="enable" class="btn btn-mini" disabled="true"><i class="icon-play"></i> Enable Console</button>
-              <button data-action="disable" class="btn btn-mini"><i class="icon-pause"></i> Disable Console</button>
+              <div class="row-fluid">
+                <button data-action="clear" class="btn btn-mini"><i class="icon-remove"></i> Clear Console</button>
+                <button data-action="enable" class="btn btn-mini" disabled="true"><i class="icon-play"></i> Enable Console</button>
+                <button data-action="disable" class="btn btn-mini"><i class="icon-pause"></i> Disable Console</button>
+                <input class="search-query input-xlarge" size="40" placeholder="Filter console content">
+              </div>
               """
 
           dom.body.prepend floatingConsole
 
-          alertContainer = floatingConsole.findFirst ".message-container"
+          messages = floatingConsole.findFirst ".message-container"
 
           floatingConsole.on "click", "[data-action=clear]", ->
             floatingConsole.hide()
-            alertContainer.update ""
+            messages.update ""
 
           floatingConsole.on "click", "[data-action=disable]", ->
 
             @attribute "disabled", true
             floatingConsole.findFirst("[data-action=enable]").attribute "disabled", false
 
-            alertContainer.hide()
+            messages.hide()
 
             return false
 


    nativeConsole = {}
    floatingConsole = null
    alertContainer = null

    forceFloating = (dom.body.attribute "data-floating-console") == "true"


            @attribute "disabled", true
            floatingConsole.findFirst("[data-action=disable]").attribute "disabled", false

            messages.show()

            return false

          floatingConsole.on "change keyup", ".search-query", ->
            updateFilter @value()

            for e in messages.children()
              visible = filter e

              e[if visible then "show" else "hide"]()

            return false

        div = dom.create
          class: className,
          _.escape message

          # Should really filter on original message, not escaped.

        unless filter div
          div.hide()

        messages.append div

        # Make sure the console is visible, even if disabled (and even if the new content is hidden).
        floatingConsole.show()

        # A slightly clumsy way to ensure that the container is scrolled to the bottom.
        _.delay -> messages.element.scrollTop = messages.element.scrollHeight

    level = (className, consolefn) ->
      (message) ->
