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 : manoj-kumar
use Illuminate\Support\Facades\Log;
Log::debug('Debug Log Tracked');
Log::emergency('Emergency Log Tracked');
Log::alert('Alert Log Tracked');
Log::error('Error Log Tracked');
Log::warning('Warning Log Tracked');
Log::notice('Notice Log Tracked');
Log::info('Info Log Tracked');
Log::critical('Critical Log Tracked');
YourLaravelProject\storage\logs\ check date wise required log file
Source : | Last Update : Mon, 02 May 22
Answered by : james-juson
use Illuminate\Support\Facades\Log;
// Severity levels base on RFC5424 commented on the right side
Log::emergency($message); // system is unusable
Log::alert($message); // action must be taken immediately
Log::critical($message); // critical conditions
Log::error($message); // error conditions
Log::warning($message); // warning conditions
Log::notice($message); // normal but significant condition
Log::info($message); // informational messages
Log::debug($message); // debug-level messages
// Checkout RFC5424 here - https://tools.ietf.org/html/rfc5424
Source : https://laravel.com/docs/8.x/logging#writing-log-messages | Last Update : Fri, 05 Mar 21
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 : funny-fly-39yna38hqehk
Log::info('This is some useful information.');
Log::warning('Something could be going wrong.');
Log::error('Something is really going wrong.');
Source : https://laravel.com/docs/5.0/errors | Last Update : Sat, 11 Jul 20
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