logger

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

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultLogger

type DefaultLogger struct {
	*log.Logger
	// contains filtered or unexported fields
}

DefaultLogger is a default implementation of the Logger interface.

func NewDefaultLogger

func NewDefaultLogger() *DefaultLogger

NewDefaultLogger creates a default logger that prints to stderr.

func NewDefaultLoggerWithPrefix

func NewDefaultLoggerWithPrefix(prefix string) *DefaultLogger

NewDefaultLogger creates a default logger that prints to stderr.

func (*DefaultLogger) Debug

func (l *DefaultLogger) Debug(v ...interface{})

Debug implements the Logger interface.

func (*DefaultLogger) Debugf

func (l *DefaultLogger) Debugf(format string, v ...interface{})

Debugf implements the Logger interface.

func (*DefaultLogger) EnableDebug

func (l *DefaultLogger) EnableDebug()

EnableDebug enables debug messages to print.

func (*DefaultLogger) Error

func (l *DefaultLogger) Error(v ...interface{})

Error implements the Logger interface.

func (*DefaultLogger) Errorf

func (l *DefaultLogger) Errorf(format string, v ...interface{})

Errorf implements the Logger interface.

func (*DefaultLogger) Fatal

func (l *DefaultLogger) Fatal(v ...interface{})

Fatal implements the Logger interface.

func (*DefaultLogger) Fatalf

func (l *DefaultLogger) Fatalf(format string, v ...interface{})

Fatalf implements the Logger interface.

func (*DefaultLogger) Info

func (l *DefaultLogger) Info(v ...interface{})

Info implements the Logger interface.

func (*DefaultLogger) Infof

func (l *DefaultLogger) Infof(format string, v ...interface{})

Infof implements the Logger interface.

func (*DefaultLogger) IsDebugEnabled

func (l *DefaultLogger) IsDebugEnabled() bool

func (*DefaultLogger) Panic

func (l *DefaultLogger) Panic(v ...interface{})

Panic implements the Logger interface.

func (*DefaultLogger) Panicf

func (l *DefaultLogger) Panicf(format string, v ...interface{})

Panicf implements the Logger interface.

func (*DefaultLogger) Warning

func (l *DefaultLogger) Warning(v ...interface{})

Warning implements the Logger interface.

func (*DefaultLogger) Warningf

func (l *DefaultLogger) Warningf(format string, v ...interface{})

Warningf implements the Logger interface.

type Logger

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

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

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

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

	Fatal(v ...interface{})
	Fatalf(format string, v ...interface{})

	Panic(v ...interface{})
	Panicf(format string, v ...interface{})
}

Logger provides a logging interface similar to golang's standard Logger.

Jump to

Keyboard shortcuts

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