log

package
v0.0.0-...-210767f Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

func Debugf(ctx context.Context, format string, args ...interface{})

func Errorf

func Errorf(ctx context.Context, format string, args ...interface{})

func Infof

func Infof(ctx context.Context, format string, args ...interface{})

func NewGCPJSONHandler

func NewGCPJSONHandler(w io.Writer, traceID string) event.Handler

NewGCPJSONLogger returns a handler which logs events in a format that is understood by Google Cloud Platform logging.

func NewLineHandler

func NewLineHandler(w io.Writer) event.Handler

NewLineHandler returns an event Handler that writes log events one per line in an easy-to-read format:

time level message label1=value1 label2=value2 ...

func Warningf

func Warningf(ctx context.Context, format string, args ...interface{})

Types

type Labels

type Labels []event.Label

func With

func With(kvs ...interface{}) Labels

func (Labels) Debugf

func (l Labels) Debugf(ctx context.Context, format string, args ...interface{})

func (Labels) Errorf

func (l Labels) Errorf(ctx context.Context, format string, args ...interface{})

func (Labels) Infof

func (l Labels) Infof(ctx context.Context, format string, args ...interface{})

func (Labels) Warningf

func (l Labels) Warningf(ctx context.Context, format string, args ...interface{})

func (Labels) With

func (ls Labels) With(kvs ...interface{}) Labels

Jump to

Keyboard shortcuts

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