evlog

package
v0.0.0-...-30ff302 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log embeds a Logger

func New

func New(logger log.Logger) *Log

New instantiates a new Log

func (*Log) TxFromContext

func (l *Log) TxFromContext(ctx context.Context) *Tx

TxFromContext returns a new Tx, using the id from the provided context

type Trace

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

Trace is used for detailed tracing of events

func (*Trace) Stop

func (t *Trace) Stop(err *error)

Stop records the time, along with any non-nil error

func (*Trace) String

func (t *Trace) String() string

type Tx

type Tx struct {
	ID string
	// contains filtered or unexported fields
}

Tx is used for loggin an event

func (*Tx) Debug

func (tx *Tx) Debug(event string, fields ...interface{})

Debug is a helper function to log a debug message

func (*Tx) Error

func (tx *Tx) Error(event string, fields ...interface{})

Error is a helper function to log an error

func (*Tx) Info

func (tx *Tx) Info(event string, fields ...interface{})

Info is a helper function to log an info message

func (*Tx) Notice

func (tx *Tx) Notice(event string, fields ...interface{})

Notice is a helper function to log a notice

func (*Tx) Panic

func (tx *Tx) Panic(event string, fields ...interface{})

Panic is a helper function to log a CRITICAL event

func (*Tx) Trace

func (tx *Tx) Trace(event string, fields ...interface{}) *Trace

Trace is a helper function to log a trace message

func (*Tx) Warning

func (tx *Tx) Warning(event string, fields ...interface{})

Warning is a helper function to log a warning

func (*Tx) With

func (tx *Tx) With(fields ...interface{}) *Tx

With returns

Jump to

Keyboard shortcuts

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