Skip to content

Commit 2d2cc8a

Browse files
committed
ICL: Example improved.
1 parent bbd37aa commit 2d2cc8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,9 @@ $middleware = iclogger_guzzle_middleware($log, 'json',
356356
return true;
357357
},
358358
function (RequestInterface $request, ResponseInterface $response) {
359-
if (ends_with($request->getUri(), '/bar')) {
360-
return false; // skips logging for /bar response bodies
359+
$contentLength = $response->getHeaderLine('Content-Length');
360+
if ($contentLength > (100 * 1024)) {
361+
return false; // skips logging for responses greater than 100 KB
361362
}
362363
363364
return true;

0 commit comments

Comments
 (0)