read laravel log code example
Example 1: how to log object laravel logger
use Illuminate\Support\Facades\Log;
Log::info(json_encode($user);
Example 2: laravel logger
use Monolog\Logger;
$orderLog = new Logger('order');
$orderLog->pushHandler(new StreamHandler(storage_path('logs/mylogs.log')), Logger::INFO);
$orderLog->info("Order id: ${orderId}");