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:
parent
e550355a5f
commit
cd111b826c
8
echo.go
8
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
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user