log

package
v0.3.1-rc.7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

func Debugf

func Debugf(format string, v ...any)

func Debugln

func Debugln(v ...any)

func Errorf

func Errorf(format string, v ...any)

func Errorln

func Errorln(v ...any)

func Infof

func Infof(format string, v ...any)

func Infoln

func Infoln(v ...any)

func IsOutput

func IsOutput(l protolog.LogLevel) bool

func NewLogger

func NewLogger(depth int32) *logger

func Output

func Output(depth int, lev protolog.LogLevel, format string, v ...any)

func Set

func Set(config *protolog.Logcat, path string)

func SetLevel

func SetLevel(l protolog.LogLevel)

func Verbosef

func Verbosef(format string, v ...any)

func Verboseln

func Verboseln(v ...any)

func Warningf

func Warningf(format string, v ...any)

func Warningln

func Warningln(v ...any)

Types

type FileWriter

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

func NewLogWriter

func NewLogWriter(file string) *FileWriter

func (*FileWriter) Close

func (f *FileWriter) Close() error

func (*FileWriter) Write

func (f *FileWriter) Write(p []byte) (n int, err error)

type Logger

type Logger interface {
	SetLevel(protolog.LogLevel)
	IsOutput(protolog.LogLevel) bool
	Verbosef(string, ...any)
	Verboseln(...any)
	Debugf(string, ...any)
	Debugln(...any)
	Infof(string, ...any)
	Infoln(...any)
	Warningf(string, ...any)
	Warningln(...any)
	Errorf(string, ...any)
	Errorln(...any)
	Output(depth int, lev protolog.LogLevel, format string, v ...any)
	SetOutput(io.Writer)
}
var DefaultLogger Logger = NewLogger(1)

Jump to

Keyboard shortcuts

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