logging

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(dir, context string, lvl logrus.Level, mode Mode) (*logrus.Entry, func() error, error)

Types

type MaestroFormatter

type MaestroFormatter struct {
	TimestampFormat string
	LogFormat       string
	LevelPadding    uint8
	ContextPadding  uint8
}

func (*MaestroFormatter) Format

func (f *MaestroFormatter) Format(e *logrus.Entry) ([]byte, error)

type Mode

type Mode uint8
const (
	ModeConsole Mode = iota
	ModeFile
	ModeBoth
)

type Rotator

type Rotator struct {
	Path     string
	Filename string
	MaxSize  uint64
	// contains filtered or unexported fields
}

func NewRotator

func NewRotator(p, filename string, maxSize uint64, perms fs.FileMode) (*Rotator, error)

func (*Rotator) Close

func (r *Rotator) Close() error

func (*Rotator) Write

func (r *Rotator) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL