diff --git a/src/Illuminate/Foundation/Exceptions/Handler.php b/src/Illuminate/Foundation/Exceptions/Handler.php index 694c87f11e47..231966ab94ea 100644 --- a/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/src/Illuminate/Foundation/Exceptions/Handler.php @@ -115,8 +115,12 @@ public function report(Exception $e) $logger->error( $e->getMessage(), - array_merge($this->context(), ['exception' => $e] - )); + array_merge( + $this->exceptionContext($e), + $this->context(), + ['exception' => $e] + ) + ); } /** @@ -145,6 +149,17 @@ protected function shouldntReport(Exception $e) })); } + /** + * Get the default exception context variables for logging. + * + * @param \Exception $e + * @return array + */ + protected function exceptionContext(Exception $e) + { + return []; + } + /** * Get the default context variables for logging. *