Boris K
Boris K

Reputation: 3580

Laravel 5 not creating logs

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.

Upvotes: 3

Views: 16766

Answers (2)

sumit sharma
sumit sharma

Reputation: 716

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

Upvotes: 2

FBidu
FBidu

Reputation: 1012

First of all, you have to do an chmod -R 777 on storage to guarantee that all of the files and folders within storage are writeable.

Secondly, it would be nice to allow the debug mode!

You can also try to run artisan tail to get the latest logs

Upvotes: 0

Related Questions