-
Notifications
You must be signed in to change notification settings - Fork 0
/
15-Debug.php
32 lines (28 loc) · 1.3 KB
/
15-Debug.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/*
|--------------------------------------------------------------------------
| Logging
|--------------------------------------------------------------------------
|
| 1. Log files are used to record and store information about events, errors, and other relevant messages that occur during the
| application's runtime.
| 2. Package: Laravel Log Viewer
| 3. Can Create Custom Log Files
| 4. Uses: Error Show, debugging and troubleshooting, Security, Performance Monitoring, Events and Tasks
*/
use Illuminate\Support\Facades\Log;
Log::debug('message');
Log::emergency('system is down');
Log::channel('slack')->info('Something happened!');
Log::stack(['single', 'slack'])->info('Something happened!');
//critical, error, warning, information, notice
/*
|-----------------------------------------------------------------------------------
| Local Debugging Tools: Laravel DebugBar, Telescope, Spatie Ray Premium, clockwork
| Custom Error Page: views/errors/404.blade.php- laravel automatically detects
| or, Publish Default Error Page by vendor:publish and Customize it- Recommended
| Fallback HTTP Error Page: 4xx.blade.php, 5xx.blade.php
| php and Javascript Error Tracking: Flare, Sentry
|-----------------------------------------------------------------------------------
*/
//Exception Handler- try, catch, throw