teller

package
v1.0.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 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 Teller

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

Teller is a logrus abstraction

func NewTeller

func NewTeller(logLevel, logFormatter string) *Teller

NewTeller introduces a Teller instance with a given log level and formatter

func (*Teller) Log

func (t *Teller) Log() *log.Logger

Log allows message loging

func (*Teller) LogWithFields

func (t *Teller) LogWithFields(fields map[string]interface{}) *log.Entry

LogWithFields allow logging some free fields associated to a message

func (*Teller) SetLogFormatter

func (t *Teller) SetLogFormatter(logFormatter string)

SetLogFormatter sets the log formatter

Both text and json formatters are accepted

func (*Teller) SetLogLevel

func (t *Teller) SetLogLevel(logLevel string)

SetLogLevel defines the logger minimum level from a string

Note that logrus default is log.InfoLevel

func (*Teller) SetLogOutput

func (t *Teller) SetLogOutput(logOutput io.Writer)

SetLogOutput defines the logger output writer

Default is os.Stdout

Jump to

Keyboard shortcuts

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