Laravel Version: 5.5.13
In current Laravel framework, if we get error in Terminal window, we see only short message without stack trace and other additional information.
For this reason I have to constantly open the log file in order to find the complete information about the last error.
Maybe make sense to give full error information right in the terminal window?
Found a simple solution. To achieve this, you can add a new method renderForConsole in your ExceptionHandler class:
use Symfony\Component\Console\Application as ConsoleApplication;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
// ...
class Handler extends ExceptionHandler
{
// other methods...
/**
* Render an exception to the console.
*
* @param OutputInterface $output
* @param \Exception $e
* @return void
*/
public function renderForConsole($output, Exception $e)
{
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_VERBOSE);
(new ConsoleApplication)->renderException($e, $output);
}
}
Now terminal displays full information about error. Thanks for this beautiful framework)
Maybe make sense to add note about this in Errors & Logging documentation section.
php artisan command -vvv
This is not a bug. You can close tthe issue
Most helpful comment
php artisan command -vvv