title: How can i avoid logging jersey WebApplicationExceptions?
body: <p>Using jersey, i throw a WebApplicationException with a 503, indicating that my service is unavailable (because some downstream service is unavailable).</p>
  
  <p>When this happens, i get logging that looks like the below, with a huge stack trace.</p>
  
  <pre><code>[exec] SEVERE: Mapped exception to response: 503 (Service Unavailable)
  [exec] javax.ws.rs.WebApplicationException
  ...
  </code></pre>
  
  <p>I don't really want this logging, since it actually ends up tying up the server's threads due to too much logging. Eg, i find many threads stuck in the below. Is there any way to just tell jersey to not log anything, or at least not log the stack trace? Note that i do want this logging for other error codes, like a 500. Just not 503's.</p>
  
  <pre><code>at java.util.logging.StreamHandler.publish(StreamHandler.java:174)
  - waiting to lock &lt;0x00000000c30ef5e0&gt; (a java.util.logging.ConsoleHandler)
  at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
  at java.util.logging.Logger.log(Logger.java:478)
  at java.util.logging.Logger.doLog(Logger.java:500)
  at java.util.logging.Logger.log(Logger.java:589)
  at com.sun.jersey.spi.container.ContainerResponse.logException(ContainerResponse.java:509)
  at com.sun.jersey.spi.container.ContainerResponse.onException(ContainerResponse.java:487)
  at com.sun.jersey.spi.container.ContainerResponse.mapWebApplicationException(ContainerResponse.java:421)
  at com.sun.jersey.spi.container.ContainerResponse.mapMappableContainerException(ContainerResponse.java:399)
  at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1418)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
  at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
  at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
  at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
  at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
  </code></pre>