Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Jiyaad's avatar

Laravel 5.3 Logging not working

Hi I am new to laravel. I have aproblem. I am unable to log a simple text log (like "Hello world" for example) to my laravel.log file.

What should my log settings be in order to achieve this?

My current configurations: in my env file: APP_LOG_LEVEL=debug

in my config/app.php file: 'log' => env('APP_LOG', 'errorlog'), 'log_level' => env('APP_LOG_LEVEL', 'debug'),

0 likes
7 replies
PavelTytyuk's avatar

Code, which you using to add a log entry, would be helpful. Your configurations says laravel to send log messages to PHP's system log, defined in error_log php config directive. Try to use 'log' => env('APP_LOG', 'single') to store log in storage/logs directory

Jiyaad's avatar

Hi Pavel Thanks for the reply. i have changed my settings as recommended by you to:

log' => env('APP_LOG', 'single')

and it still not logging. my log code is as follows, i am basically calling a profile page via my controller which does get called because other code executes and in the controller i am trying to log the following:

Log::emergency("Hello World");
Log::alert("Hello World");
Log::critical("Hello World");
Log::error("Hello World");
Log::warning("Hello World");
Log::notice("Hello World");
Log::info("Hello World");
Log::debug("Hello World");          

None of these are logging to the laravel.log file. I have added the following use statement as well at the top of my controller page:

use Illuminate\Support\Facades\Log;
PavelTytyuk's avatar

Do you have storage/logs/laravel.log file created? Also check your .env file for log settings, which may override the app config

parth's avatar

I faced the same issue. It was issue related with file permissions.

micksp's avatar

I found that if i use "php artisan serv" instead of a local vhost (apache), the logging like Log::info() doesn't work, only exceptions get written to laravel.log in my storage/log. "Doesn't work" means not in laravel log, not in php std log. As soon as I use apache, logging works.

Please or to participate in this conversation.