From cd111b826ce1df29dd0ab1f8538eaa92c447a053 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Fri, 17 Jul 2015 23:00:19 -0700 Subject: [PATCH] Added API to enable/disable colored log. Signed-off-by: Vishal Rana --- echo.go | 8 ++++---- website/docs/guide.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/echo.go b/echo.go index f76553e93..cbb8505b1 100644 --- a/echo.go +++ b/echo.go @@ -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 } diff --git a/website/docs/guide.md b/website/docs/guide.md index 8d96ce986..2359de23d 100644 --- a/website/docs/guide.md +++ b/website/docs/guide.md @@ -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