'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
],
.
.
.
.
----> 'test' => [
'driver' => 'single',
'path' => storage_path('logs/test.log'),
'level' => env('LOG_LEVEL', 'debug'),
],
],
.
.
.
.
],
];
Add the file ' test.log ' for this test in the dir ' /storage/logs/test.log ' according the configuration above
Ensure the new log ' test.log ' is in .gitignore file to avoid to be sent to the repository
<?php
return [
'default' => env('MAIL_MAILER', 'log'), <----- This is in your .env file config. By default you can set it with 'log' value.
.
.
.
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.gmail.com'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => null,
],
.
.
.
.
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'), <----- This is in your .env file config. It is the name of the channel.
],
.
.
.
.
'array' => [
'transport' => 'array',
],
];
The ' .env ' file config
The ' app -> config -> logging '
Ensure the new log file is created and is in place in ' storage/logs/emails '