logger

package module
v0.0.0-...-bd34503 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DEBUG logutils.LogLevel = "DEBUG"
	ERROR logutils.LogLevel = "ERROR"
	INFO  logutils.LogLevel = "INFO"
	WARN  logutils.LogLevel = "WARN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func Default

func Default() *Logger

Initialize a new logger writing to stderr. This is a singleton, so if New() was called previously, then that object will be returned and not necessarily one initialized to write to stderr.

func Get

func Get() *Logger

func New

func New(out io.Writer, noColor bool, noTimestamps bool) *Logger

Initialize a new logger writing the given io.Writer. This is a singleton, so if New() was called previously, the previously initialized object is returned.

func (*Logger) Debugf

func (l *Logger) Debugf(f string, s ...interface{})

func (*Logger) Debugln

func (l *Logger) Debugln(s ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(f string, s ...interface{})

func (*Logger) Errorln

func (l *Logger) Errorln(s ...interface{})

func (*Logger) Printf

func (l *Logger) Printf(f string, s ...interface{})

func (*Logger) Println

func (l *Logger) Println(s ...interface{})

func (*Logger) SetMinLevel

func (l *Logger) SetMinLevel(level logutils.LogLevel)

Sets the minimum logging level

func (*Logger) Warnf

func (l *Logger) Warnf(f string, s ...interface{})

func (*Logger) Warnln

func (l *Logger) Warnln(s ...interface{})

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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