-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ add onlyErrors
option to HttpLoggingInterceptor
#610
Conversation
onlyErrors
option HttpLoggingInterceptor
onlyErrors
option to HttpLoggingInterceptor
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #610 +/- ##
===========================================
+ Coverage 92.85% 93.05% +0.19%
===========================================
Files 22 22
Lines 490 504 +14
===========================================
+ Hits 455 469 +14
Misses 35 35 ☔ View full report in Codecov by Sentry. |
@Guldem would you mind throwing an eye on this? P.S. I've also replaced all the (immutable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition! Found 1 small thing
Add ability to
HttpLoggingInterceptor
to only log HTTP errors.Rationale
The
HttpLoggingInterceptor
amazing, however, due to its verbosity the level of output can sometimes seem overwhelming. Having the ability to only show verbose logs for HTTP errors is therefore in my mind a nice feature.Usage
Passing
onlyErrors: true
to the constructor will limit the logger to only log responses with an HTTP status code of 400 and above.This PR is a response/solution to @Guldem's #609 (comment)