Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithRotation ¶
func WithRotation(log *logrus.Logger, path string, duration time.Duration, maxCount uint, maxAge time.Duration) error
WithRotation enhances logrus log to be written to local filesystem, with file rotation path sets log's base path prefix duration sets the time between rotation. maxCount sets the number of files should be kept before it gets purged from the file system. maxAge sets the max age of a log file before it gets purged from the file system.
Types ¶
type FieldLogger ¶
type FieldLogger struct {
// contains filtered or unexported fields
}
func New ¶
func New(l logrus.FieldLogger) *FieldLogger
func (*FieldLogger) GetLogger ¶
func (b *FieldLogger) GetLogger() logrus.FieldLogger
func (*FieldLogger) GetStdLogger ¶
func (b *FieldLogger) GetStdLogger() *log.Logger
func (*FieldLogger) SetLogger ¶
func (b *FieldLogger) SetLogger(l logrus.FieldLogger)
func (*FieldLogger) SetStdLogger ¶
func (b *FieldLogger) SetStdLogger(l *log.Logger)
Click to show internal directories.
Click to hide internal directories.