mirror of
https://github.com/labstack/echo.git
synced 2025-11-06 08:59:21 +02:00
@@ -25,9 +25,17 @@ and message `HTTPError.Message`.
|
||||
|
||||
Enables/disables debug mode.
|
||||
|
||||
### Disable colored log
|
||||
### Log output
|
||||
|
||||
`Echo#DisableColoredLog()`
|
||||
`echo#SetOutput(w io.Writer)`
|
||||
|
||||
SetOutput sets the output destination for the global logger.
|
||||
|
||||
### Log level
|
||||
|
||||
`echo#SetLogLevel(l log.Level)`
|
||||
|
||||
SetLogLevel sets the log level for global logger. The default value is `log.INFO`.
|
||||
|
||||
### Hook
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ menu:
|
||||
|
||||
```go
|
||||
e.Use(func(c *echo.Context) error {
|
||||
log.Println(c.Path()) // Prints `/users/:name`
|
||||
println(c.Path()) // Prints `/users/:name`
|
||||
return nil
|
||||
})
|
||||
e.Get("/users/:name", func(c *echo.Context) error) {
|
||||
|
||||
Reference in New Issue
Block a user