mirror of
https://github.com/labstack/echo.git
synced 2025-01-12 01:22:21 +02:00
API to define a custom logger
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
e7518f5aca
commit
23eb4f87db
5
echo.go
5
echo.go
@ -263,6 +263,11 @@ func (e *Echo) SetLogLevel(l uint8) {
|
|||||||
e.logger.SetLevel(l)
|
e.logger.SetLevel(l)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetLogger defines a custom logger.
|
||||||
|
func (e *Echo) SetLogger(l *log.Logger) {
|
||||||
|
e.logger = l
|
||||||
|
}
|
||||||
|
|
||||||
// Logger returns the logger instance.
|
// Logger returns the logger instance.
|
||||||
func (e *Echo) Logger() *log.Logger {
|
func (e *Echo) Logger() *log.Logger {
|
||||||
return e.logger
|
return e.logger
|
||||||
|
Loading…
Reference in New Issue
Block a user