Skip to content

Commit

Permalink
Added API to enable/disable colored log.
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Jul 18, 2015
1 parent e550355 commit cd111b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions website/docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cd111b8

Please sign in to comment.