logging

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseFileHandle

func CloseFileHandle(wg *sync.WaitGroup)

func Init

func Init(dir string)

func New

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

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