log

package
v0.0.0-...-4fdfd55 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Debug  = "debug"
	Info   = "info"
	Warn   = "warn"
	Error  = "error"
	DPanic = "dpanic"
	Panic  = "panic"
	Fatal  = "fatal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Debug(msg string, keyvals ...interface{})
	Info(msg string, keyvals ...interface{})
	Warn(msg string, keyvals ...interface{})
	Error(err error, keyvals ...interface{})
	Fatal(err error, keyvalls ...interface{})
	Bug(err error, keyvalls ...interface{})
	With(args ...interface{}) Logger
}

Logger is the fundamental interface for all log operations. Logger creates a log event from keyvals, a variadic sequence of alternating keys and values.

Implementations must be safe for concurrent use by multiple goroutines. In particular, any implementation of Logger that appends to keyvals or modifies or retains any of its elements must make a copy first.

func NewLogger

func NewLogger(production bool, level string) (Logger, error)

func NopLogger

func NopLogger() Logger

Jump to

Keyboard shortcuts

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