mardi 15 novembre 2016

Laravel keeps logging even though APP_DEBUG=false

For some reason laravel keeps writing log statements to the laravel log after I have set APP_DEBUG=false in my .env file.

I have the following log statement:

Log::debug("testmessage : BEGIN");

I have confirmed that the environment variable is being read by Laravel. I did this using this command that writes to the error log:

error_log("APP_DEBUG : " . env('APP_DEBUG', false));

It displays nothing if APP_DEBUG is false and '1' if it is true

I have cleared the cache :

gavin@gavin-VirtualBox:/var/www/hipengage$ **php artisan config:cache**
Configuration cache cleared!
Configuration cached successfully!
gavin@gavin-VirtualBox:/var/www/hipengage$ **php artisan cache:clear**
Application cache cleared!

I have restarted apache

My .env file looks like this:

APP_ENV=local
APP_DEBUG=false
APP_KEY=*********************************

DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

Anything I am missing here? Any help much appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire