mirror of
https://github.com/labstack/echo.git
synced 2024-11-24 08:22:21 +02:00
Error handler now printing error messages
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
c6b32d5541
commit
795ab0ad77
2
echo.go
2
echo.go
@ -282,7 +282,7 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
|
||||
if !c.Response().Committed() {
|
||||
c.String(code, msg)
|
||||
}
|
||||
e.logger.Debug(err)
|
||||
e.logger.Error(err)
|
||||
}
|
||||
|
||||
// SetHTTPErrorHandler registers a custom Echo.HTTPErrorHandler.
|
||||
|
@ -60,7 +60,7 @@ type (
|
||||
// ProtocolMinor() int
|
||||
|
||||
// ContentLength returns the size of request's body.
|
||||
ContentLength() int
|
||||
ContentLength() int64
|
||||
|
||||
// UserAgent returns the client's `User-Agent`.
|
||||
UserAgent() string
|
||||
|
@ -64,8 +64,8 @@ func (r *Request) Referer() string {
|
||||
}
|
||||
|
||||
// ContentLength implements `engine.Request#ContentLength` function.
|
||||
func (r *Request) ContentLength() int {
|
||||
return r.Request.Header.ContentLength()
|
||||
func (r *Request) ContentLength() int64 {
|
||||
return int64(r.Request.Header.ContentLength())
|
||||
}
|
||||
|
||||
// UserAgent implements `engine.Request#UserAgent` function.
|
||||
|
@ -82,8 +82,8 @@ func (r *Request) Referer() string {
|
||||
// }
|
||||
|
||||
// ContentLength implements `engine.Request#ContentLength` function.
|
||||
func (r *Request) ContentLength() int {
|
||||
return int(r.Request.ContentLength)
|
||||
func (r *Request) ContentLength() int64 {
|
||||
return r.Request.ContentLength
|
||||
}
|
||||
|
||||
// UserAgent implements `engine.Request#UserAgent` function.
|
||||
|
@ -72,8 +72,8 @@ func (r *Request) Referer() string {
|
||||
// return r.request.ProtoMinor()
|
||||
// }
|
||||
|
||||
func (r *Request) ContentLength() int {
|
||||
return int(r.request.ContentLength)
|
||||
func (r *Request) ContentLength() int64 {
|
||||
return r.request.ContentLength
|
||||
}
|
||||
|
||||
func (r *Request) UserAgent() string {
|
||||
|
Loading…
Reference in New Issue
Block a user