log

package
v0.0.0-...-417840b Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLogFileClosed = errors.New("rotator: log file has been closed")
)
View Source
var (
	Level = zerolog.InfoLevel
)

Functions

func Debug

func Debug() *zerolog.Event

func Error

func Error() *zerolog.Event

func Fatal

func Fatal() *zerolog.Event

func Info

func Info() *zerolog.Event

func Trace

func Trace() *zerolog.Event

func Warn

func Warn() *zerolog.Event

func With

func With() zerolog.Context

Types

type Logger

type Logger interface {
	With() zerolog.Context
	Trace() *zerolog.Event
	Debug() *zerolog.Event
	Info() *zerolog.Event
	Warn() *zerolog.Event
	Error() *zerolog.Event
	Fatal() *zerolog.Event
}

func SubLogger

func SubLogger(from string) Logger

type RotateFrequency

type RotateFrequency uint8
const (
	// default rotate Frequency
	Daily RotateFrequency = iota
	Hourly
)

type Rotator

type Rotator struct {
	// contains filtered or unexported fields
}

func NewRotator

func NewRotator(path string) (*Rotator, error)

func (*Rotator) Close

func (r *Rotator) Close() error

func (*Rotator) SetMaxCopies

func (r *Rotator) SetMaxCopies(m int)

func (*Rotator) SetRotateFrequency

func (r *Rotator) SetRotateFrequency(f RotateFrequency)

func (*Rotator) Write

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

Jump to

Keyboard shortcuts

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