slog

package
v0.0.0-...-2694f69 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelSilence = iota
	LevelFatal
	LevelError
	LevelWarning
	LevelNotice
	LevelInfo
	LevelDebug
	LevelVerbose
	LevelVeryVerbose
)

Variables

This section is empty.

Functions

func Check

func Check(cond bool, v ...interface{})

func Checkf

func Checkf(cond bool, format string, v ...interface{})

func Debug

func Debug(v ...interface{})

Extra information for debugging.

func Debugf

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

Extra information for debugging.

func Error

func Error(v ...interface{})

Issues that shouldn't be ignored.

func Errorf

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

Issues that shouldn't be ignored.

func Fatal

func Fatal(v ...interface{})

Serious problems that are likely to cause the program to exit.

func Fatalf

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

Serious problems that are likely to cause the program to exit.

func Info

func Info(v ...interface{})

Normal work reports.

func Infof

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

Normal work reports.

func Notice

func Notice(v ...interface{})

Important status changes. The prefix is 'I'.

func Noticef

func Noticef(format string, v ...interface{})

Important status changes. The prefix is 'I'.

func Output

func Output(calldepth int, level int, msg []byte)

func Panic

func Panic(v ...interface{})

func Panicf

func Panicf(format string, v ...interface{})

func Verbose

func Verbose(v ...interface{})

Details for inspecting specific issues.

func Verbosef

func Verbosef(format string, v ...interface{})

Details for inspecting specific issues.

func VeryVerbose

func VeryVerbose(v ...interface{})

More details that may significantly impact performance. The prefix is 'V'.

func VeryVerbosef

func VeryVerbosef(format string, v ...interface{})

More details that may significantly impact performance. The prefix is 'V'.

func Warning

func Warning(v ...interface{})

Issues that may be ignored.

func Warningf

func Warningf(format string, v ...interface{})

Issues that may be ignored.

func Wrap

func Wrap(logger *Logger, level int) *log.Logger

Types

type Logger

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

func Default

func Default() *Logger

func (*Logger) Check

func (l *Logger) Check(cond bool, v ...interface{})

func (*Logger) CheckLevel

func (l *Logger) CheckLevel(level int) bool

func (*Logger) Checkf

func (l *Logger) Checkf(cond bool, format string, v ...interface{})

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...interface{})

func (*Logger) Notice

func (l *Logger) Notice(v ...interface{})

func (*Logger) Noticef

func (l *Logger) Noticef(format string, v ...interface{})

func (*Logger) Output

func (l *Logger) Output(calldepth int, level int, msg []byte)

func (*Logger) Panic

func (l *Logger) Panic(v ...interface{})

func (*Logger) Panicf

func (l *Logger) Panicf(format string, v ...interface{})

func (*Logger) SetLevel

func (l *Logger) SetLevel(level int)

func (*Logger) SetOutput

func (l *Logger) SetOutput(w io.Writer)

func (*Logger) SetOutputConfig

func (l *Logger) SetOutputConfig(output, tag string) error

func (*Logger) Verbose

func (l *Logger) Verbose(v ...interface{})

func (*Logger) Verbosef

func (l *Logger) Verbosef(format string, v ...interface{})

func (*Logger) VeryVerbose

func (l *Logger) VeryVerbose(v ...interface{})

func (*Logger) VeryVerbosef

func (l *Logger) VeryVerbosef(format string, v ...interface{})

func (*Logger) Warning

func (l *Logger) Warning(v ...interface{})

func (*Logger) Warningf

func (l *Logger) Warningf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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