log

package
v0.0.4-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogFunctionType

type LogFunctionType uint32

LogFunctionType type

const (
	FatalFn LogFunctionType = iota
	ErrorFn
	WarnFn
	InfoFn
	DebugFn
	DoneFn
)

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})

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

	Done(args ...interface{})
	Donef(format string, args ...interface{})

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

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

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

	Print(level logrus.Level, args ...interface{})
	Printf(level logrus.Level, format string, args ...interface{})

	Writer(level logrus.Level, raw bool) io.WriteCloser
	WriteString(level logrus.Level, message string)

	SetLevel(level logrus.Level)
	GetLevel() logrus.Level

	// WithLevel creates a new logger with the given level
	WithLevel(level logrus.Level) Logger
	ErrorStreamOnly() Logger
	WithPrefix(prefix string) Logger
	WithPrefixColor(prefix, color string) Logger
	WithSink(sink Logger) Logger
	AddSink(sink Logger)
}

Logger defines the common logging interface

Jump to

Keyboard shortcuts

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