log

package
v0.0.0-...-e791307 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLevel

func SetLevel(level Level)

Set logger verbosity.

func SetSink

func SetSink(sink io.Writer)

Override the backend output sink.

Types

type Level

type Level logging.Level
const (
	Debug Level = iota
	Info
	Notice
	Warning
	Error
)

The levels that can be passed to the SetLevel function.

type Logger

type Logger interface {
	Debug(v ...interface{})
	Debugf(format string, v ...interface{})

	Notice(v ...interface{})
	Noticef(format string, v ...interface{})

	Info(v ...interface{})
	Infof(format string, v ...interface{})

	Warning(v ...interface{})
	Warningf(format string, v ...interface{})

	Error(v ...interface{})
	Errorf(format string, v ...interface{})
}

The logger interface

func New

func New(name string) Logger

Create a new named logger.

Jump to

Keyboard shortcuts

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