Skip to content

Commit

Permalink
include error details tip
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangut committed Nov 10, 2019
1 parent b9c8bd7 commit 1579fd2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Handler/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@ protected function writeToErrorLog(): void
'stacktrace' => $this->getStackTrace(),
];

$this->logger->log($logLevel, $this->exception->getMessage(), $logContext);
$message = $this->exception->getMessage();
if (!$this->displayErrorDetails) {
$message .= "\nTips: To display error details in HTTP response ";
$message .= 'set "displayErrorDetails" to true in the ErrorHandler constructor.';
}

$this->logger->log($logLevel, $message, $logContext);
}

/**
Expand Down

0 comments on commit 1579fd2

Please sign in to comment.