log

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: 0BSD Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotExist = errors.New("namespaced logger does not exist")
)

Functions

func EnrichLogger

func EnrichLogger(weak stdLogger) gapLogger

func SetNSLogger

func SetNSLogger(namespace string, logger Logger)

Types

type Logger

type Logger struct {
	SubLoggers []levelLogger
}

func Default

func Default() *Logger

func GetNSLogger

func GetNSLogger(namespace string) (*Logger, error)

func (Logger) Debug

func (l Logger) Debug(args ...interface{})

Debug prints out logs on debug level

func (Logger) Debugf

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

Formatted print for Debug

func (Logger) Error

func (l Logger) Error(args ...interface{})

Error prints out logs on error level

func (Logger) Errorf

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

Formatted print for error

func (Logger) Errorln

func (l Logger) Errorln(args ...interface{})

Error prints out logs on error level with a new line

func (Logger) Fatal

func (l Logger) Fatal(args ...interface{})

Fatal prints out logs on fatal level

func (Logger) Fatalf

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

Formatted print for fatal

func (Logger) Fatalln

func (l Logger) Fatalln(args ...interface{})

Fatal prints fatal level with a new line

func (Logger) Info

func (l Logger) Info(args ...interface{})

Info prints out logs on info level

func (Logger) Infof

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

Formatted print for Info

func (Logger) Infoln

func (l Logger) Infoln(args ...interface{})

Info prints out logs on info level with newline

func (Logger) Notice

func (l Logger) Notice(args ...interface{})

Notice prints out logs on notice level

func (Logger) Noticef

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

Formatted print for Notice

func (Logger) Noticeln

func (l Logger) Noticeln(args ...interface{})

Notice prints out logs on notice level with newline

func (Logger) Panic

func (l Logger) Panic(args ...interface{})

Panic prints out logs on panic level

func (Logger) Panicf

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

Formatted print for panic

func (Logger) Panicln

func (l Logger) Panicln(args ...interface{})

Panic prints out logs on panic level with a newline

func (Logger) Print

func (l Logger) Print(args ...interface{})

Handles print

func (Logger) Printf

func (l Logger) Printf(format string, args ...interface{})

Handles formatted print

func (Logger) Println

func (l Logger) Println(args ...interface{})

Handles print with new line

func (Logger) Trace

func (l Logger) Trace(args ...interface{})

Trace prints out logs on trace level

func (Logger) Tracef

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

Formatted print for Trace

func (Logger) Traceln

func (l Logger) Traceln(args ...interface{})

Trace prints out logs on trace level with newline

func (Logger) Warn

func (l Logger) Warn(args ...interface{})

Warn prints out logs on warn level

func (Logger) Warnf

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

Formatted print for Warn

func (Logger) Warnln

func (l Logger) Warnln(args ...interface{})

Warn prints out logs on warn level with a newline

Jump to

Keyboard shortcuts

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