How to specify a separate file for logging INFO in Laravel 5.1?
Any immediate help will be highly appreciable. Thanks
In Laravel 5.6 you can create your own channel in config\logging.php. If you have upgraded from an older Laravel version you need to create this file (https://laravel.com/docs/5.6/upgrade).
Add this to you channel array in config\logging.php
'your_channel_name' => [
'driver' => 'single',
'path' => storage_path('logs/your_file_name.log'),
],
You can then call any of the 8 logging levels like that:
Illuminate\Support\Facades\Log::channel('your_channel_name')->info('your_message');
The logs will be stored in logs/your_file_name.log