Skip to content

Commit cd111b8

Browse files
committedJul 18, 2015
Added API to enable/disable colored log.
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent e550355 commit cd111b8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
 

‎echo.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func New() (e *Echo) {
158158
//----------
159159

160160
if runtime.GOOS == "windows" {
161-
e.DisableColoredLog()
161+
e.ColoredLog(false)
162162
}
163163
e.HTTP2(false)
164164
e.notFoundHandler = func(c *Context) error {
@@ -195,12 +195,12 @@ func (e *Echo) Router() *Router {
195195
return e.router
196196
}
197197

198-
// DisableColoredLog disables colored log.
199-
func (e *Echo) DisableColoredLog() {
198+
// ColoredLog enable/disable colored log.
199+
func (e *Echo) ColoredLog(on bool) {
200200
color.Disable()
201201
}
202202

203-
// HTTP2 enables HTTP2 support.
203+
// HTTP2 enable/disable HTTP2 support.
204204
func (e *Echo) HTTP2(on bool) {
205205
e.http2 = on
206206
}

‎website/docs/guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ and message `HTTPError.Message`.
4646

4747
Enables debug mode.
4848

49-
### Disable colored log
49+
### Enable/Disable colored log
5050

51-
`Echo.DisableColoredLog()`
51+
`Echo.ColoredLog(on bool)`
5252

5353
## Routing
5454

0 commit comments

Comments
 (0)