To help you learn more about what's happening within your application, Laravel provides robust logging services that allow you to log messages to files, the system error log, and even to Slack to notify your entire team.
In this folder there have the log file.
storage/logs
We can create laravel custom log file. Go to the config\logging.php
//By default have
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
//here is the custom log example:
'custom' => [
'driver' => 'single',
'path' => storage_path('logs/custom.log'),
'level' => env('LOG_LEVEL', 'debug'),
'replace_placeholders' => true,
],
If we want to show the every log data show our custom log file . Edit the .env
file
replace
LOG_CHANNEL=stack to LOG_CHANNEL=custom
Top comments (0)