1
0
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:
Vishal Rana 2016-05-19 08:30:20 -07:00
parent c6b32d5541
commit 795ab0ad77
5 changed files with 8 additions and 8 deletions

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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 {