Can we create a custom log file for different purposes in laravel 5.2 like for order related log entries that should be in order.log and for payment related stuff the entry shou
This is supported in a much easier way now
Create a channel
goto: root/config/logging.php
, under channels
array add your custom channel i.e
'payments' => [
'driver' => 'single',
'path' => storage_path('logs/payments.log'),
'level' => 'info',
],
Log::channel('payments')->info('A transaction has been made!');
/storage/logs/payments.log
NOTE: extendible to enhance furthur your requirements
Laravel version 5.6 Docs