log

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: GPL-3.0 Imports: 10 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugLevel = logrus.DebugLevel
View Source
var TraceLevel = logrus.TraceLevel

Functions

func Debugf

func Debugf(format string, args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func Fatalf

func Fatalf(format string, args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func IsLevelEnabled

func IsLevelEnabled(level logrus.Level) bool

func NewClientLogFile

func NewClientLogFile() (io.WriteCloser, error)

NewClientLogFile returns a file handler for mieru client to write logs.

func RemoveOldClientLogFiles

func RemoveOldClientLogFiles() error

RemoveOldClientLogFiles deletes the oldest client log files.

func SetFormatter

func SetFormatter(formatter logrus.Formatter)

func SetLevel

func SetLevel(level string)

func SetOutput

func SetOutput(out io.Writer)

func Tracef

func Tracef(format string, args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

func WithFields

func WithFields(fields Fields) *logrus.Entry

Types

type CliFormatter

type CliFormatter struct{}

CliFormatter is a log formatter that works best for command output. It doesn't print time, level, or field data.

func (*CliFormatter) Format

func (f *CliFormatter) Format(entry *logrus.Entry) ([]byte, error)

type DaemonFormatter

type DaemonFormatter struct{}

DaemonFormatter is the a log formatter that is suitable for daemon.

func (*DaemonFormatter) Format

func (f *DaemonFormatter) Format(entry *logrus.Entry) ([]byte, error)

type Fields

type Fields = logrus.Fields

type NilFormatter

type NilFormatter struct{}

NilFormatter prints no log. It disables logging.

func (*NilFormatter) Format

func (f *NilFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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