log

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	ChangeVerbosity(v Verbosity)
	Debug(v ...interface{})
	Debugf(format string, v ...interface{})
	Info(v ...interface{})
	Infof(format string, v ...interface{})
	Warn(v ...interface{})
	Warnf(format string, v ...interface{})
	Error(v ...interface{})
	Errorf(format string, v ...interface{})
	Fatal(v ...interface{})
	Fatalf(format string, v ...interface{})
}

Logger is a simple logger for logging to standard output.

func New

func New(v Verbosity) Logger

New creates a new logger.

type Verbosity

type Verbosity int

Verbosity is the verbosity level of a logger.

const (
	// Debug shows logs in all levels.
	Debug Verbosity = iota
	// Info shows logs in Info, Warn, Error, and Fatal levels.
	Info
	// Warn shows logs in Warn, Error, and Fatal levels.
	Warn
	// Error shows logs in Error and Fatal levels.
	Error
	// Fatal shows logs in Fatal level.
	Fatal
	// None does not show any logs.
	None
)

Jump to

Keyboard shortcuts

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