Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5 not creating logs

Tags:

php

laravel-5

I am getting started with Laravel 5, using Homestead/Vagrant for a server, SSHing in with Putty.

I'm building my first site and it's not creating a log in /storage/logs. Neither is it displaying errors. I've run chmod -777 on the /storage directory, so that's not it. Any ideas?

UPDATE: as suggested, I went into the error.log in vagrant/var/hhvm/. Sure enough, that was it. The error was "\nFatal error: Class undefined: HTML in /home/vagrant/Code/Laravel/storage/framework/views/441aef21be6c3c32079f86e5812a9d0a on line 39".

I followed the steps listed below to add the class. http://laravelcollective.com/docs/5.0/html#installation Edited the composer.json, ran composer update, added the provider and aliases. Still getting the white screen of death.

There is now a log in /storage/, which says:

[2015-05-27 11:33:44] local.ERROR: exception 'InvalidArgumentException' with message 'Command "tail" is not defined.' in /home/vagrant/Code/laravel/vendor/symfony/console/Symfony/Component/Console/Application.php:549 , followed by a stack trace. This seems to be the error thrown by my attempt to run laravel tail, which I did before looking in the vagrant log. Nothing in there about why it's not loading now.
like image 466
Boris K Avatar asked Nov 21 '25 13:11

Boris K


1 Answers

As FBidu answered very good answer,but artisan tail is not come with default package in laravel 5. However can be installed with composer require spatie/laravel-tail

In config/app.php

'providers' => [
    ...
    'Spatie\Tail\TailServiceProvider',
    ...
];

After that’s done you can tail your local log with

php artisan tail

The remote log can be tailed with php artisan tail production

Link here

like image 176
sumit sharma Avatar answered Nov 23 '25 03:11

sumit sharma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!