logger

package
v0.0.0-...-ce96b73 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LEVEL_TRACE logLevel = iota
	LEVEL_DEBUG logLevel = iota
	LEVEL_INFO  logLevel = iota
	LEVEL_WARN  logLevel = iota
	LEVEL_ERROR logLevel = iota
)
View Source
const (
	Noop = noop("")
)

Variables

This section is empty.

Functions

func Writer

func Writer(level logLevel) io.Writer

Types

type Logger

type Logger interface {
	Trace(format string, args ...interface{})
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Error(format string, args ...interface{})
	Fatal(format string, args ...interface{})
}
var Default Logger = Basic(LEVEL_INFO)

func Basic

func Basic(l logLevel) Logger

func WithPrefix

func WithPrefix(prefix string, l logLevel) Logger

Jump to

Keyboard shortcuts

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