log

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraceLevel    severity = 1
	DebugLevel    severity = 2
	InfoLevel     severity = 3
	WarningLevel  severity = 4
	ErrorLevel    severity = 5
	CriticalLevel severity = 6
)

Variables

This section is empty.

Functions

func AddTracer

func AddTracer(ctx context.Context) context.Context

func Critical

func Critical(msg string)

func Criticalf

func Criticalf(things ...interface{})

func Debug

func Debug(msg string)

func DebugTrace

func DebugTrace(ctx context.Context, msg string) (ok bool)

func DebugTracef

func DebugTracef(ctx context.Context, things ...interface{}) (ok bool)

func Debugf

func Debugf(things ...interface{})

func Error

func Error(msg string)

func ErrorTrace

func ErrorTrace(ctx context.Context, msg string) (ok bool)

func ErrorTracef

func ErrorTracef(ctx context.Context, things ...interface{}) (ok bool)

func Errorf

func Errorf(things ...interface{})

func Info

func Info(msg string)

func InfoTrace

func InfoTrace(ctx context.Context, msg string) (ok bool)

func InfoTracef

func InfoTracef(ctx context.Context, things ...interface{}) (ok bool)

func Infof

func Infof(things ...interface{})

func ParseLevel

func ParseLevel(level string) severity

func SetFileLevels

func SetFileLevels(levels map[string]severity)

func SetLogLevel

func SetLogLevel(level severity)

func Shutdown

func Shutdown()

Shutdown writes remaining log lines and then stops the logger.

func Start

func Start() (err error)

func Test

func Test(msg string)

func Testf

func Testf(things ...interface{})

func Trace

func Trace(msg string)

func Tracef

func Tracef(things ...interface{})

func UnSetFileLevels

func UnSetFileLevels()

func Warning

func Warning(msg string)

func WarningTrace

func WarningTrace(ctx context.Context, msg string) (ok bool)

func WarningTracef

func WarningTracef(ctx context.Context, things ...interface{}) (ok bool)

func Warningf

func Warningf(things ...interface{})

Types

type Action

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

type ContextTracer

type ContextTracer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func Tracer

func Tracer(ctx context.Context) *ContextTracer

func (*ContextTracer) Error

func (ct *ContextTracer) Error(msg string) (ok bool)

func (*ContextTracer) Errorf

func (ct *ContextTracer) Errorf(things ...interface{}) (ok bool)

func (*ContextTracer) Trace

func (ct *ContextTracer) Trace(msg string) (ok bool)

func (*ContextTracer) Tracef

func (ct *ContextTracer) Tracef(things ...interface{}) (ok bool)

func (*ContextTracer) Warning

func (ct *ContextTracer) Warning(msg string) (ok bool)

func (*ContextTracer) Warningf

func (ct *ContextTracer) Warningf(things ...interface{}) (ok bool)

type ContextTracerKey

type ContextTracerKey struct{}

Key for context value

Jump to

Keyboard shortcuts

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