title: Monolog: Handler to catch errors/exceptions and output the messages in the response (as per PHP default)
body: <p>How can I configure Monolog to output PHP errors within the response, as would have been done without Monolog?</p>
  
  <p>What I want to do is when, for example, a PHP E_ERROR occurs within a PHP page, that error message will be output to the response, and also passed to any other Handlers set for Monolog.</p>
  
  <p>AFAIK, I might use StreamHandler and have it output to stdout, but don't know how to do this or if it will work as expected?</p>
  
  <p>There are two variations I'd like the option of:</p>
  
  <ol>
  <li>Monolog re-formats the error message before having it output within the response</li>
  <li>Monolog relays the error (or exception) back to PHP native error handling so that it outputs the message in the same format in the response as if Monolog was not mediating it</li>
  </ol>
  
  <p>How could I achieve these? I don't even know how I can get Monolog to register itself as a handler for exceptions and errors. Would I need to write my own functions to pass to <code>register_error_handler()</code>, <code>register_exception_handler()</code> and <code>register_shutdown_function()</code>?</p>