title: How can I configure an exception view in Pyramid for friendly error pages, but still pass errors through to a logger?
body: <p>I'm attempting to set up <a href="https://getsentry.com/welcome/" rel="nofollow">Sentry</a> for my current web app. It can be <a href="http://raven.readthedocs.org/en/latest/config/pyramid.html#logger-setup" rel="nofollow">configured to act as a logger</a>.</p>
  
  <p>However, I have an Exception view that looks like this:</p>
  
  <pre><code>@view_config(context=Exception,
               renderer='hitchedup:templates/errors/500.html')
  def error_view(exc, request):
      """Display a friendly error message"""
      return {}
  </code></pre>
  
  <p>The idea is that whenever any exception occurs on the site, I can deliver a friendly message to the user.</p>
  
  <p>But, how do I still pass the errors through to the logger? Right now, the Exception view catches all exceptions, but then they never reach the logger.</p>
  
  <p>I tried raising and catching <code>exc</code> inline in the Exception view, then sending it to Sentry through the client directly, but then I don't get the full stacktrace I would get if I caught the exception where it was originally raised.</p>
  
  <p>How can I get both friendly 500 pages and still have good logging and error reporting?</p>