1
0
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:
Vishal Rana 2016-05-29 08:34:44 -07:00
parent e7518f5aca
commit 23eb4f87db

View File

@ -263,6 +263,11 @@ func (e *Echo) SetLogLevel(l uint8) {
e.logger.SetLevel(l)
}
// SetLogger defines a custom logger.
func (e *Echo) SetLogger(l *log.Logger) {
e.logger = l
}
// Logger returns the logger instance.
func (e *Echo) Logger() *log.Logger {
return e.logger