log

package
v0.0.0-...-003ff6d Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

type Fields logrus.Fields

Fields own declaration of logrus.Fields

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugln(args ...interface{})
	Debugf(msg string, args ...interface{})
	Info(msg string)
	Infoln(...interface{})
	Infof(msg string, args ...interface{})
	Warn(msg string)
	Warnln(...interface{})
	Warnf(msg string, args ...interface{})
	Error(msg string)
	Errorf(msg string, args ...interface{})
	Fatalf(msg string, args ...interface{})
	Print(args ...interface{})
	Println(...interface{})
	Printf(msg string, args ...interface{})
	Trace(args ...interface{})
	Traceln(...interface{})
	Tracef(msg string, args ...interface{})
	Verbose() bool
	WithFields(m map[string]interface{}) Logger
	WithPrefix(prefix string) Logger
}

Logger implements structured and leveled logging

func New

func New(w io.Writer, level, dir string) Logger

New returns a implementation of Logger with logrus

type LogrusFileHook

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

func NewLogrusFileHook

func NewLogrusFileHook(file string, flag int, chmod os.FileMode) (*LogrusFileHook, error)

func (*LogrusFileHook) Fire

func (hook *LogrusFileHook) Fire(entry *logrus.Entry) error

func (*LogrusFileHook) Levels

func (hook *LogrusFileHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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