title: Dump HTTP requests in WildFly 8
body: <p>To debug HTTP requests during development, <strong>I would like my WildFly 8 application server to dump HTTP requests, including request method and headers, to a log file</strong>. <code>server.log</code> would be fine.</p>
  
  <p>In the sources of WildFly's HTTP subsystem, I found <a href="https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/server/handlers/RequestDumpingHandler.java">RequestDumpingHandler</a> and the corresponding logging category <code>io.undertow.request.dump</code></p>
  
  <p>However, I cannot figure out, how to install that header so that it is applied for all requests served by my application (a WAR with some static resources and JAX-RS handler).</p>
  
  <p>The corresponding documentation page (<a href="https://docs.jboss.org/author/display/WFLY8/Undertow+%28web%29+subsystem+configuration">Undertow web subsystem configuration</a>) doesn't really explain handlers. There is a <code>&lt;handler&gt;</code> element in the configuration section</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" ?&gt;
  &lt;server xmlns="urn:jboss:domain:2.1"&gt;
      ...
      &lt;profile&gt;
          ...
          &lt;subsystem xmlns="urn:jboss:domain:undertow:1.1"&gt;
          &lt;buffer-cache name="default"/&gt;
          &lt;server name="default-server"&gt;
              &lt;http-listener name="default" socket-binding="http"/&gt;
              &lt;host name="default-host" alias="localhost"&gt;
                  &lt;location name="/" handler="welcome-content"/&gt;
                  &lt;filter-ref name="server-header"/&gt;
                  &lt;filter-ref name="x-powered-by-header"/&gt;
              &lt;/host&gt;
          &lt;/server&gt;
          &lt;servlet-container name="default"&gt;
              &lt;jsp-config/&gt;
          &lt;/servlet-container&gt;
          &lt;handlers&gt;
              &lt;file name="welcome-content" path="${jboss.home.dir}/welcome-content"/&gt;
              &lt;!-- &lt;dump-request /&gt; ?? or something?--&gt;
          &lt;/handlers&gt;
          &lt;filters&gt;
              &lt;response-header name="server-header" header-name="Server" header-value="WildFly/8"/&gt;
              &lt;response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/&gt;
          &lt;/filters&gt;
          &lt;/subsystem&gt;
          ...
      &lt;/profile&gt;
      ...
  &lt;/server&gt;
  </code></pre>
  
  <p>but as far as I can tell, only <code>&lt;file&gt;</code> and proxy are expected there(?).</p>
  
  <p><strong>How can I log full details of incoming HTTP requests in WildFly?</strong> I know I could install some logging mechanism at the JAX-RS layer, but I would like to have one dump mechanism that handles both REST API calls and statically served resources.</p>