1
0
mirror of https://github.com/labstack/echo.git synced 2025-07-15 01:34:53 +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" { if runtime.GOOS == "windows" {
e.DisableColoredLog() e.ColoredLog(false)
} }
e.HTTP2(false) e.HTTP2(false)
e.notFoundHandler = func(c *Context) error { e.notFoundHandler = func(c *Context) error {
@ -195,12 +195,12 @@ func (e *Echo) Router() *Router {
return e.router return e.router
} }
// DisableColoredLog disables colored log. // ColoredLog enable/disable colored log.
func (e *Echo) DisableColoredLog() { func (e *Echo) ColoredLog(on bool) {
color.Disable() color.Disable()
} }
// HTTP2 enables HTTP2 support. // HTTP2 enable/disable HTTP2 support.
func (e *Echo) HTTP2(on bool) { func (e *Echo) HTTP2(on bool) {
e.http2 = on e.http2 = on
} }

View File

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