logger

package
v0.0.0-...-3c3d79d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelEmergency = iota
	LevelAlert
	LevelCritical
	LevelError
	LevelWarning
	LevelNotice
	LevelInformational
	LevelDebug
)

RFC5424 log message levels.

View Source
const (
	LevelInfo  = LevelInformational
	LevelTrace = LevelDebug
	LevelWarn  = LevelWarning
)

Legacy log level constants to ensure backwards compatibility.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger() *Logger

func (*Logger) Alert

func (bl *Logger) Alert(format string, v ...interface{})

Alert Log ALERT level message.

func (*Logger) Critical

func (bl *Logger) Critical(format string, v ...interface{})

Critical Log CRITICAL level message.

func (*Logger) Debug

func (bl *Logger) Debug(format string, v ...interface{})

Debug Log DEBUG level message.

func (*Logger) Error

func (bl *Logger) Error(format string, v ...interface{})

Error Log ERROR level message.

func (*Logger) Info

func (bl *Logger) Info(format string, v ...interface{})

Info Log INFO level message. compatibility alias for Informational()

func (*Logger) Informational

func (bl *Logger) Informational(format string, v ...interface{})

Informational Log INFORMATIONAL level message.

func (*Logger) Notice

func (bl *Logger) Notice(format string, v ...interface{})

Notice Log NOTICE level message.

func (Logger) SetOutput

func (bl Logger) SetOutput(w io.Writer) *Logger

func (Logger) SetPrefix

func (bl Logger) SetPrefix(prefix string) *Logger

func (*Logger) Trace

func (bl *Logger) Trace(format string, v ...interface{})

Trace Log TRACE level message. compatibility alias for Debug()

func (*Logger) Warn

func (bl *Logger) Warn(format string, v ...interface{})

Warn Log WARN level message. compatibility alias for Warning()

func (*Logger) Warning

func (bl *Logger) Warning(format string, v ...interface{})

Warning Log WARNING level message.

Jump to

Keyboard shortcuts

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