log

package module
v0.0.0-...-2fbd6fd Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2019 License: MIT Imports: 6 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crit

func Crit(msg string, ctx ...interface{})

func Debug

func Debug(msg string, ctx ...interface{})

func Error

func Error(msg string, ctx ...interface{})

func FormatRecord

func FormatRecord(r Record) []byte

func Info

func Info(msg string, ctx ...interface{})

func SetLevel

func SetLevel(level Lvl)

func Warn

func Warn(msg string, ctx ...interface{})

Types

type Logger

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

func Child

func Child(ctx ...interface{}) Logger

func NewLogger

func NewLogger() Logger

func (Logger) Child

func (l Logger) Child(ctx ...interface{}) Logger

func (Logger) Crit

func (l Logger) Crit(msg string, ctx ...interface{})

func (Logger) Debug

func (l Logger) Debug(msg string, ctx ...interface{})

func (Logger) Error

func (l Logger) Error(msg string, ctx ...interface{})

func (Logger) Info

func (l Logger) Info(msg string, ctx ...interface{})

func (Logger) Warn

func (l Logger) Warn(msg string, ctx ...interface{})

type Lvl

type Lvl int
const (
	CritLevel Lvl = iota
	ErrorLevel
	WarnLevel
	InfoLevel
	DebugLevel
)

func (Lvl) String

func (l Lvl) String() string

Returns the name of a Lvl

type Record

type Record struct {
	Time time.Time
	Lvl  Lvl
	Msg  string
	Ctx  []interface{}
}

Jump to

Keyboard shortcuts

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