Documentation ¶
Index ¶
- Variables
- func Extract(ctx echo.Context) *logrus.Entry
- func WithLogger(ctx echo.Context, logger *logrus.Entry) echo.Context
- type Logger
- func (l *Logger) Debugj(j log.JSON)
- func (l *Logger) Errorj(j log.JSON)
- func (l *Logger) Fatalj(j log.JSON)
- func (l *Logger) Infoj(j log.JSON)
- func (l *Logger) Level() log.Lvl
- func (l *Logger) Output() io.Writer
- func (l *Logger) Panicj(j log.JSON)
- func (l *Logger) Prefix() string
- func (l *Logger) Printj(j log.JSON)
- func (l *Logger) SetFormatter(formatter logrus.Formatter)
- func (l *Logger) SetHeader(h string)
- func (l *Logger) SetLevel(v log.Lvl)
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) SetPrefix(p string)
- func (l *Logger) Warnj(j log.JSON)
Constants ¶
This section is empty.
Variables ¶
var (
DefaultLogger = NewLogger()
)
Functions ¶
func WithLogger ¶
Types ¶
type Logger ¶
Logger wraps logrus.Logger
func (*Logger) Debugj ¶
Debugj is used to implement echo.Logger. It creates an logrus.Entry with fields j, then call Debug.
func (*Logger) Errorj ¶
Errorj is used to implement echo.Logger. It creates an logrus.Entry with fields j, then call Error.
func (*Logger) Fatalj ¶
Fatalj is used to implement echo.Logger. It creates an logrus.Entry with fields j, then call Fatal.
func (*Logger) Infoj ¶
Infoj is used to implement echo.Logger. It creates an logrus.Entry with fields j, then call Info.
func (*Logger) Panicj ¶
Panicj is used to implement echo.Logger. It creates an logrus.Entry with fields j, then call Panic.
func (*Logger) Prefix ¶
Prefix is used to implement echo.Logger. This function always returns empty string because prefix is not needed in logrus.
func (*Logger) Printj ¶
Printj is used to implement echo.Logger. It creates an logrus.Entry with fields j, then call Print.
func (*Logger) SetFormatter ¶
SetFormatter changes logger's formatter
func (*Logger) SetLevel ¶
SetLevel changes logging level. If you want to change underlying logrus logger's level, call l.Logger.SetLevel function.