logger

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level uint32

Level type

const (
	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
	// Commonly used for hooks to send errors to an error tracking service.
	ErrorLevel Level = iota
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel
	// InfoLevel level. General operational entries about what's going on inside the
	// application.
	InfoLevel
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel
	// TraceLevel level. Designates finer-grained informational events than the Debug.
	TraceLevel
)

type Logger

type Logger interface {
	Errorf(format string, data ...interface{})
	Warnf(format string, data ...interface{})
	Infof(format string, data ...interface{})
	Debugf(format string, data ...interface{})
	Tracef(format string, data ...interface{})
}

type NoopLogger

type NoopLogger struct{}

func (*NoopLogger) Debugf

func (n *NoopLogger) Debugf(format string, data ...interface{})

func (*NoopLogger) Errorf

func (n *NoopLogger) Errorf(format string, data ...interface{})

func (*NoopLogger) Infof

func (n *NoopLogger) Infof(format string, data ...interface{})

func (*NoopLogger) Tracef

func (n *NoopLogger) Tracef(format string, data ...interface{})

func (*NoopLogger) Warnf

func (n *NoopLogger) Warnf(format string, data ...interface{})

type SimpleLogger

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

func NewSimpleLogger

func NewSimpleLogger() *SimpleLogger

func (*SimpleLogger) Debugf

func (s *SimpleLogger) Debugf(format string, data ...interface{})

func (*SimpleLogger) Errorf

func (s *SimpleLogger) Errorf(format string, data ...interface{})

func (*SimpleLogger) Infof

func (s *SimpleLogger) Infof(format string, data ...interface{})

func (*SimpleLogger) SetLevel

func (s *SimpleLogger) SetLevel(level Level)

func (*SimpleLogger) Tracef

func (s *SimpleLogger) Tracef(format string, data ...interface{})

func (*SimpleLogger) Warnf

func (s *SimpleLogger) Warnf(format string, data ...interface{})

Jump to

Keyboard shortcuts

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