Skip to content
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 body trimming #55

Open
Fylipp opened this issue Mar 19, 2020 · 6 comments
Open

Add body trimming #55

Fylipp opened this issue Mar 19, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@Fylipp
Copy link

Fylipp commented Mar 19, 2020

When logging the bodies of large requests or responses it would make sense to allow them to be limited to a certain size. Otherwise large bodies clutter the console without adding value.

@hg-pyun
Copy link
Owner

hg-pyun commented Mar 19, 2020

Great idea. But I think It can be controlled by axios maxContentLength property. This part looks good to delegate to axios.

@Fylipp
Copy link
Author

Fylipp commented Mar 20, 2020

The problem is that an application might need the entire response. For my use case I expect to receive multiple kilobytes of text data and it all has to be processed, meaning I need Axios to properly treat the response (ruling out maxContentLength). However, this fills up the logs with lots of clutter from the logging. Being able to only the log the first 100 characters or so would allow logging to be used with large responses.

@hg-pyun
Copy link
Owner

hg-pyun commented Mar 21, 2020

Oh, I see. You means that It need to limit for only log data. I will consider. Thank you for feedback.

@hg-pyun hg-pyun mentioned this issue Mar 21, 2020
5 tasks
@hg-pyun hg-pyun mentioned this issue Nov 2, 2020
8 tasks
@hg-pyun hg-pyun added the enhancement New feature or request label Dec 23, 2020
@giogonzo
Copy link

👍 this would be very helpful

@richardscholten
Copy link

#129

@ducnguyen-healthemed
Copy link

@hg-pyun Could you please take a look on #129 and merge it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants