Answered by : dizzy-dunlin-r657cuxqo1na
use Illuminate\Support\Facades\Log;
Log::emergency($message);
Log::alert($message);
Log::critical($message);
Log::error($message);
Log::warning($message);
Log::notice($message);
Log::info($message);
Log::debug($message);
Source : | Last Update : Tue, 07 Jul 20
Answered by : sazzad-hossain-nirjhor-h1whv1vt0dd3
use Illuminate\Support\Facades\Log;
Log::build([ 'driver' => 'single', 'path' => storage_path('logs/custom.log'),
])->info('Something happened!');
Source : | Last Update : Sun, 15 May 22
Answered by : alberto-peripolli
use Log;
Log::emergency($message);
Log::alert($message);
Log::critical($message);
Log::error($message);
Log::warning($message);
Log::notice($message);
Log::info($message);
Log::debug($message);
Source : https://laravel.com/docs/7.x/logging | Last Update : Tue, 05 May 20
Answered by : uluk-ulanbekov
use Monolog\Logger;
$orderLog = new Logger('order');
$orderLog->pushHandler(new StreamHandler(storage_path('logs/mylogs.log')), Logger::INFO);
$orderLog->info("Order id: ${orderId}");
Source : | Last Update : Fri, 01 Jan 21
Answered by : yawning-yak-smkb3u9pnkak
use Illuminate\Support\Facades\Log;
Log::emergency($message);
Log::alert($message);
Log::critical($message);
Log::error($message);
Log::warning($message);
Log::notice($message);
Log::info($message);
Log::debug($message);
Source : https://laravel.com/docs/9.x/logging | Last Update : Tue, 01 Mar 22
Answered by : ariful-islam
composer require spatie/laravel-activitylog
Source : https://spatie.be/docs/laravel-activitylog/v4/installation-and-setup | Last Update : Mon, 28 Jun 21
Answered by : irfan-majid
Log :: emergency();
Log :: alert();
Log :: critical();
Log :: error();
Log :: warning();
Log :: notice();
Log :: info();
Log :: debug();
Source : | Last Update : Wed, 25 May 22
Answered by : itchy-iguana-axpt8sq1aduz
Log::info('User failed to login.', ['id' => $user->id]);
Source : | Last Update : Thu, 22 Sep 22
Answered by : busy-beaver-slwb83jq5ll1
use Illuminate\Support\Facades\Log;
Log::channel('slack')->info('Something happened!');
Source : https://laravel.com/docs/9.x/logging#writing-to-specific-channels | Last Update : Sun, 18 Sep 22