tools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel int

LogLevel enum

const (
	//LogLevelError LogLevelError
	LogLevelError LogLevel = iota

	//LogLevelInfo LogLevelInfo
	LogLevelInfo LogLevel = iota

	//LogLevelDetail LogLevelDetail
	LogLevelDetail LogLevel = iota

	//LogLevelDebug LogLevelDebug
	LogLevelDebug LogLevel = iota
)

type Logger

type Logger interface {
	Error(...interface{})
	Errorf(string, ...interface{})
	Info(...interface{})
	Infof(string, ...interface{})
	Detail(...interface{})
	Detailf(string, ...interface{})
	Debug(...interface{})
	Debugf(string, ...interface{})
}

Logger logger

func NewLogger

func NewLogger(level LogLevel, tag string, target io.Writer) Logger

NewLogger create a new logger that writes to stdout

func NewStdoutLogger

func NewStdoutLogger(level LogLevel, tag string) Logger

NewStdoutLogger create a new logger that writes to stdout

type LoggerImpl

type LoggerImpl struct {
	LogLevel LogLevel
	Target   io.Writer
	Tag      string
}

LoggerImpl standard logger implementation

func (*LoggerImpl) Debug

func (li *LoggerImpl) Debug(vals ...interface{})

Debug Debug

func (*LoggerImpl) Debugf

func (li *LoggerImpl) Debugf(format string, vals ...interface{})

Debugf Debugf

func (*LoggerImpl) Detail

func (li *LoggerImpl) Detail(vals ...interface{})

Detail Detail

func (*LoggerImpl) Detailf

func (li *LoggerImpl) Detailf(format string, vals ...interface{})

Detailf Detailf

func (*LoggerImpl) Error

func (li *LoggerImpl) Error(vals ...interface{})

Error Error

func (*LoggerImpl) Errorf

func (li *LoggerImpl) Errorf(format string, vals ...interface{})

Errorf Errorf

func (*LoggerImpl) Info

func (li *LoggerImpl) Info(vals ...interface{})

Info Info

func (*LoggerImpl) Infof

func (li *LoggerImpl) Infof(format string, vals ...interface{})

Infof Infof

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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