Skip to content

Conversation

@pyama86
Copy link

@pyama86 pyama86 commented Apr 24, 2017

hi!
Echo is one of golang's best products.

There are cases where you want to output the body of the request to the log at the beginning of development, so I would like to make this change.

I may develop middleware, but since I become a patch while the difference is small, I want to avoid it if possible.

thanks.

@coveralls
Copy link

coveralls commented Apr 24, 2017

Coverage Status

Coverage increased (+0.1%) to 83.82% when pulling c3139bc on pyama86:request-body-outoputlog into 8173bb8 on labstack:master.

@anjmao
Copy link

anjmao commented May 5, 2017

This is nice, I also wanted something like this, but I think it must be configurable on the middleware like this:

e.Use(middleware.Logger(logBody: true))

because in some cases it can generate huge logs and you may not want that. @vishr What do you think ?

@vishr vishr self-assigned this May 5, 2017
@pyama86
Copy link
Author

pyama86 commented May 6, 2017

I agree with your opinion 👍
May I work?

@coveralls
Copy link

coveralls commented May 8, 2017

Coverage Status

Coverage increased (+0.04%) to 83.758% when pulling 55087de on pyama86:request-body-outoputlog into 4256489 on labstack:master.

@montanaflynn
Copy link

This is cool, we also have custom middleware to do this for the request body. I am wondering how it would be possible to capture the response body for logging as well.

@vishr vishr force-pushed the master branch 3 times, most recently from f652f79 to 3fafadf Compare June 10, 2017 02:29
@vishr
Copy link
Member

vishr commented Jun 15, 2017

This will be covered in https://github.com/labstack/echo/tree/issue-950

@vishr vishr closed this Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants