logger

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Null is /dev/null emulation

Functions

This section is empty.

Types

type EmptyWriter added in v1.10.4

type EmptyWriter struct{}

EmptyWriter struct

func (EmptyWriter) Write added in v1.10.4

func (EmptyWriter) Write(data []byte) (int, error)

Write /dev/null emulation

type Logger

type Logger interface {
	Output() io.Writer
	SetOutput(w io.Writer)

	Prefix() string
	SetPrefix(p string)

	Level() log.Lvl
	SetLevel(v log.Lvl)

	WithContext(fields map[string]interface{}) Logger
	Named(name string) Logger

	Print(i ...interface{})
	Printf(format string, args ...interface{})
	Printj(j log.JSON)

	Debug(i ...interface{})
	Debugf(format string, args ...interface{})
	Debugj(j log.JSON)
	Debugw(message string, args ...interface{})

	Info(i ...interface{})
	Infof(format string, args ...interface{})
	Infoj(j log.JSON)
	Infow(message string, args ...interface{})

	Warn(i ...interface{})
	Warnf(format string, args ...interface{})
	Warnj(j log.JSON)
	Warnw(message string, args ...interface{})

	Error(i ...interface{})
	Errorf(format string, args ...interface{})
	Errorj(j log.JSON)
	Errorw(message string, args ...interface{})

	Fatal(i ...interface{})
	Fatalj(j log.JSON)
	Fatalf(format string, args ...interface{})
	Fatalw(message string, args ...interface{})

	Panic(i ...interface{})
	Panicj(j log.JSON)
	Panicf(format string, args ...interface{})
	Panicw(message string, args ...interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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