1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Added API to enable/disable colored log.

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2015-07-17 23:00:19 -07:00
parent e550355a5f
commit cd111b826c
2 changed files with 6 additions and 6 deletions

View File

@ -158,7 +158,7 @@ func New() (e *Echo) {
//----------
if runtime.GOOS == "windows" {
e.DisableColoredLog()
e.ColoredLog(false)
}
e.HTTP2(false)
e.notFoundHandler = func(c *Context) error {
@ -195,12 +195,12 @@ func (e *Echo) Router() *Router {
return e.router
}
// DisableColoredLog disables colored log.
func (e *Echo) DisableColoredLog() {
// ColoredLog enable/disable colored log.
func (e *Echo) ColoredLog(on bool) {
color.Disable()
}
// HTTP2 enables HTTP2 support.
// HTTP2 enable/disable HTTP2 support.
func (e *Echo) HTTP2(on bool) {
e.http2 = on
}

View File

@ -46,9 +46,9 @@ and message `HTTPError.Message`.
Enables debug mode.
### Disable colored log
### Enable/Disable colored log
`Echo.DisableColoredLog()`
`Echo.ColoredLog(on bool)`
## Routing