Documentation ¶
Index ¶
- func ExitFunc(exit func(int)) logger.Option
- func JSONFormatter(formatter *logrus.JSONFormatter) logger.Option
- func NewLogger(opts ...logger.Option) logger.Logger
- func ReportCaller(r bool) logger.Option
- func SplitLevel(s bool) logger.Option
- func TextFormatter(formatter *logrus.TextFormatter) logger.Option
- func TimestampFormat(format string) logger.Option
- func WithoutKey(w bool) logger.Option
- func WithoutQuote(w bool) logger.Option
- type Options
- type PersistenceLevelHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONFormatter ¶
func JSONFormatter(formatter *logrus.JSONFormatter) logger.Option
func ReportCaller ¶
warning to use this option. because logrus doest not open CallerDepth option this will only print this package
func SplitLevel ¶
func TextFormatter ¶
func TextFormatter(formatter *logrus.TextFormatter) logger.Option
func TimestampFormat ¶
func WithoutKey ¶
func WithoutQuote ¶
Types ¶
type PersistenceLevelHook ¶
type PersistenceLevelHook struct { Writer io.Writer Fired bool // contains filtered or unexported fields }
func (*PersistenceLevelHook) Levels ¶
func (hook *PersistenceLevelHook) Levels() []ls.Level
Directories ¶
Path | Synopsis |
---|---|
Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
|
Package logrus is a structured logger for Go, completely API compatible with the standard library logger. |
hooks/test
The Test package is used for testing logrus.
|
The Test package is used for testing logrus. |
Package lumberjack provides a rolling logger.
|
Package lumberjack provides a rolling logger. |
test
|
|
Click to show internal directories.
Click to hide internal directories.