Skip to content

Commit d299013

Browse files
authored
reduce log time, cathc more exceptions (#45)
1 parent 4bd2224 commit d299013

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bootstrap/app.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use GuzzleHttp\Exception\RequestException;
34
use GuzzleHttp\Exception\ClientException;
45
use GuzzleHttp\Exception\ServerException;
56
use Illuminate\Foundation\Application;
@@ -29,7 +30,7 @@
2930
]);
3031
})
3132
->withExceptions(function (Exceptions $exceptions) {
32-
$exceptions->report(function (ServerException|ClientException $e) {
33+
$exceptions->report(function (ServerException|ClientException|RequestException $e) {
3334
Log::warning('HTTP Request Exception', [
3435
'url' => (string) $e->getRequest()->getUri(),
3536
'status' => $e->getResponse()->getStatusCode(),

config/logging.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
'driver' => 'daily',
7070
'path' => storage_path('logs/laravel.log'),
7171
'level' => env('LOG_LEVEL', 'debug'),
72-
'days' => env('LOG_DAILY_DAYS', 14),
72+
'days' => env('LOG_DAILY_DAYS', 3),
7373
'replace_placeholders' => true,
7474
],
7575

0 commit comments

Comments
 (0)